Skip to content

Commit 3fb1c48

Browse files
committed
优化中文API review by songym
1 parent 8c12251 commit 3fb1c48

File tree

4 files changed

+114
-115
lines changed

4 files changed

+114
-115
lines changed

src/classic/overlay/MapVLayer.js

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import {MapVRenderer} from './mapv/MapVRenderer';
66
* @category Visualization MapV
77
* @classdesc MapV图层。
88
* @extends SuperMap.Layer
9-
* @param name - {string} 图层名
10-
* @param options - {Object} 可选参数,有如下两个参数:<br>
11-
* dataSet - {mapv.DataSet} mapv 的dataSet对象 <br>
12-
* options - {Object} mapv 绘图风格配置信息
9+
* @param name - {string} 图层名。
10+
* @param {Object} options - 可选参数,有如下两个参数:
11+
* @param {Mapv.DataSet} options.dataSet - mapv 的dataSet对象。
1312
*/
1413
export class MapVLayer extends SuperMap.Layer {
1514

@@ -28,33 +27,33 @@ export class MapVLayer extends SuperMap.Layer {
2827
super(name, options);
2928

3029
/**
31-
* @member SuperMap.Layer.MapVLayer.prototype.dataSet -{mapv.DataSet}
32-
* @description mapv dataset 对象
30+
* @member {mapv.DataSet} - SuperMap.Layer.MapVLayer.prototype.dataSet
31+
* @description mapv dataset 对象
3332
*/
3433
this.dataSet = null;
3534

3635
/**
37-
* @member SuperMap.Layer.MapVLayer.prototype.options -{Object}
38-
* @description mapv 绘图风格配置信息
36+
* @member {Object} - SuperMap.Layer.MapVLayer.prototype.options
37+
* @description mapv 绘图风格配置信息
3938
*/
4039
this.options = null;
4140

4241
/**
43-
* @member SuperMap.Layer.MapVLayer.prototype.supported -{boolean}
44-
* @description 当前浏览器是否支持canvas绘制,默认为false。决定了MapV图是否可用,内部判断使用。
42+
* @member {boolean} - [SuperMap.Layer.MapVLayer.prototype.supported=false]
43+
* @description 当前浏览器是否支持canvas绘制。决定了MapV图是否可用,内部判断使用。
4544
*/
4645
this.supported = false;
4746

4847
/**
49-
* @member SuperMap.Layer.MapVLayer.prototype.canvas {Canvas}
50-
* @description MapV图主绘制面板
48+
* @member {Canvas} SuperMap.Layer.MapVLayer.prototype.canvas
49+
* @description MapV 图主绘制面板
5150
*/
5251
this.canvas = null;
5352

5453
/**
5554
* @private
56-
* @member SuperMap.Layer.MapVLayer.prototype.canvasContext -{CanvasContext}
57-
* @description MapV图主绘制对象
55+
* @member {CanvasContext} - SuperMap.Layer.MapVLayer.prototype.canvasContext
56+
* @description MapV 图主绘制对象
5857
*/
5958
this.canvasContext = null;
6059

@@ -105,9 +104,9 @@ export class MapVLayer extends SuperMap.Layer {
105104

106105
/**
107106
* @function SuperMap.Layer.MapVLayer.prototype.addData
108-
* @description 追加数据
109-
* @param dataSet - {mapv.DataSet} mapv数据集
110-
* @param options - {Object} mapv绘图参数
107+
* @description 追加数据
108+
* @param {mapv.DataSet} dataSet - mapv数据集
109+
* @param {Object} options - mapv绘图参数
111110
*/
112111
addData(dataSet, options) {
113112
this.renderer && this.renderer.addData(dataSet, options);
@@ -116,9 +115,9 @@ export class MapVLayer extends SuperMap.Layer {
116115

117116
/**
118117
* @function SuperMap.Layer.MapVLayer.prototype.
119-
* @description 设置数据
120-
* @param dataSet {mapv.DataSet} mapv数据集
121-
* @param options {Object} mapv绘图参数
118+
* @description 设置数据
119+
* @param {mapv.DataSet} dataSet - mapv数据集
120+
* @param {Object} options - mapv绘图参数
122121
*/
123122
setData(dataSet, options) {
124123
this.renderer && this.renderer.setData(dataSet, options);
@@ -127,8 +126,8 @@ export class MapVLayer extends SuperMap.Layer {
127126

128127
/**
129128
* @function SuperMap.Layer.MapVLayer.prototype.getData
130-
* @description 获取数据
131-
* @return {mapv.DataSet} mapv数据集
129+
* @description 获取数据
130+
* @returns {mapv.DataSet} - mapv数据集
132131
*/
133132
getData() {
134133
if (this.renderer) {
@@ -139,8 +138,8 @@ export class MapVLayer extends SuperMap.Layer {
139138

140139
/**
141140
* @function SuperMap.Layer.MapVLayer.prototype.removeData
142-
* @description 删除符合过滤条件的数据
143-
* @param filter - {function} 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除
141+
* @description 删除符合过滤条件的数据
142+
* @param {function} [filter] - 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除
144143
* @example
145144
* filter=function(data){
146145
* if(data.id=="1"){
@@ -166,7 +165,7 @@ export class MapVLayer extends SuperMap.Layer {
166165
* @function SuperMap.Layer.MapVLayer.prototype.setMap
167166
* @description 图层已经添加到Map中。
168167
* 如果当前浏览器支持canvas,则开始渲染要素;如果不支持则移除图层。
169-
* @param map - {SuperMap.Map} 需要绑定的map对象
168+
* @param {SuperMap.Map} map - 需要绑定的map对象
170169
*/
171170
setMap(map) {
172171
super.setMap(map);
@@ -182,9 +181,9 @@ export class MapVLayer extends SuperMap.Layer {
182181
* @function SuperMap.Layer.MapVLayer.prototype.moveTo
183182
* @description 重置当前MapV图层的div,再一次与Map控件保持一致。
184183
* 修改当前显示范围,当平移或者缩放结束后开始重绘MapV图的渲染效果。
185-
* @param bounds - {SuperMap.Bounds} 图层范围
186-
* @param zoomChanged - {boolean} 缩放级别是否改变
187-
* @param dragging - {boolean} 是否拖动
184+
* @param {SuperMap.Bounds} bounds - 图层范围
185+
* @param {boolean} [zoomChanged] - 缩放级别是否改变
186+
* @param {boolean} [dragging] - 是否拖动
188187
*/
189188
moveTo(bounds, zoomChanged, dragging) {
190189
super.moveTo(bounds, zoomChanged, dragging);
@@ -221,8 +220,8 @@ export class MapVLayer extends SuperMap.Layer {
221220

222221
/**
223222
* @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng
224-
* @description 将经纬度转成底图的投影坐标
225-
* @param latLng - {SuperMap.Lonlat} 经纬度坐标
223+
* @description 将经纬度转成底图的投影坐标
224+
* @param {SuperMap.Lonlat} [latLng] - 经纬度坐标
226225
*/
227226
transferToMapLatLng(latLng) {
228227
var source = "EPSG:4326", dest = "EPSG:4326";

src/classic/overlay/mapv/MapVRenderer.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import {baiduMapLayer, DataSet} from 'mapv';
55
* @class MapVRenderer
66
* @classdesc MapV渲染器。
77
* @private
8-
* @extends mapv.MapVBaseLayer
9-
* @param map - {SuperMap.Map} 待渲染的地图
10-
* @param layer - {mapv.baiduMapLayer} 待渲染的图层
11-
* @param dataSet - {mapv.DataSet} 待渲染的数据集
12-
* @param options - {Object} 渲染的参数
8+
* @extends {mapv.baiduMapLayer}
9+
* @param {SuperMap.Map} map - 待渲染的地图
10+
* @param {SuperMap.Layer.MapVLayer} layer - 待渲染的图层
11+
* @param {Mapv.DataSet} dataSet - 待渲染的数据集
12+
* @param {Object} options - 渲染的参数
1313
*/
1414
var MapVBaseLayer = baiduMapLayer ? baiduMapLayer.__proto__ : Function;
1515

@@ -34,8 +34,8 @@ export class MapVRenderer extends MapVBaseLayer {
3434

3535
/**
3636
* @function MapvRenderer.prototype.clickEvent
37-
* @description 点击事件
38-
* @param e - {Object} 触发对象
37+
* @description 点击事件
38+
* @param {Object} e - 触发对象
3939
*/
4040
clickEvent(e) {
4141
var pixel = e.xy;
@@ -44,8 +44,8 @@ export class MapVRenderer extends MapVBaseLayer {
4444

4545
/**
4646
* @function MapvRenderer.prototype.mousemoveEvent
47-
* @description 鼠标移动事件
48-
* @param e - {Object} 触发对象
47+
* @description 鼠标移动事件
48+
* @param {Object} e - 触发对象
4949
*/
5050
mousemoveEvent(e) {
5151
var pixel = e.xy;
@@ -54,7 +54,7 @@ export class MapVRenderer extends MapVBaseLayer {
5454

5555
/**
5656
* @function MapvRenderer.prototype.bindEvent
57-
* @description 绑定鼠标移动和鼠标点击事件
57+
* @description 绑定鼠标移动和鼠标点击事件
5858
*/
5959
bindEvent() {
6060
var map = this.map;
@@ -71,7 +71,7 @@ export class MapVRenderer extends MapVBaseLayer {
7171

7272
/**
7373
* @function MapvRenderer.prototype.unbindEvent
74-
* @description 解绑鼠标移动和鼠标滑动触发的事件
74+
* @description 解绑鼠标移动和鼠标滑动触发的事件
7575
*/
7676
unbindEvent() {
7777
var map = this.map;
@@ -88,7 +88,7 @@ export class MapVRenderer extends MapVBaseLayer {
8888

8989
/**
9090
* @function MapvRenderer.prototype.getContext
91-
* @description 获取信息
91+
* @description 获取信息
9292
*/
9393
getContext() {
9494
return this.canvasLayer && this.canvasLayer.canvasContext;
@@ -97,8 +97,8 @@ export class MapVRenderer extends MapVBaseLayer {
9797
/**
9898
* @function MapvRenderer.prototype.addData
9999
* @description 追加数据
100-
* @param data - {oject} 待添加的数据
101-
* @param options - {oject} 待添加的数据信息
100+
* @param {oject} data - 待添加的数据
101+
* @param {oject} options - 待添加的数据信息
102102
*/
103103
addData(data, options) {
104104
var _data = data;
@@ -111,9 +111,9 @@ export class MapVRenderer extends MapVBaseLayer {
111111

112112
/**
113113
* @function MapvRenderer.prototype.updateData
114-
* @description 更新覆盖原数据
115-
* @param data - {oject} 待更新的数据
116-
* @param options - {oject} 待更新的数据信息
114+
* @description 更新覆盖原数据
115+
* @param {oject} data - 待更新的数据
116+
* @param {oject} options - 待更新的数据信息
117117
*/
118118
setData(data, options) {
119119
var _data = data;
@@ -127,16 +127,16 @@ export class MapVRenderer extends MapVBaseLayer {
127127

128128
/**
129129
* @function MapvRenderer.prototype.getData
130-
* @description 获取数据
130+
* @description 获取数据
131131
*/
132132
getData() {
133133
return this.dataSet;
134134
}
135135

136136
/**
137137
* @function MapvRenderer.prototype.removeData
138-
* @description 删除符合过滤条件的数据
139-
* @param filter - {function} 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除
138+
* @description 删除符合过滤条件的数据
139+
* @param {function} [filter] - 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除
140140
*/
141141
removeData(filter) {
142142
if (!this.dataSet) {
@@ -153,7 +153,7 @@ export class MapVRenderer extends MapVBaseLayer {
153153

154154
/**
155155
* @function MapvRenderer.prototype.clearData
156-
* @description 清除数据
156+
* @description 清除数据
157157
*/
158158
clearData() {
159159
this.dataSet && this.dataSet.clear();
@@ -162,16 +162,16 @@ export class MapVRenderer extends MapVBaseLayer {
162162

163163
/**
164164
* @function MapvRenderer.prototype.render
165-
* @description 着色
166-
* @param time - {number}
165+
* @description 着色
166+
* @param {number} time
167167
*/
168168
render(time) {
169169
this._canvasUpdate(time);
170170
}
171171

172172
/**
173173
* @function MapvRenderer.prototype.transferToMercator
174-
* @description 墨卡托坐标为经纬度
174+
* @description 墨卡托坐标为经纬度
175175
*/
176176
transferToMercator() {
177177
if (this.options.coordType && ["bd09mc", "coordinates_mercator"].indexOf(this.options.coordType) > -1) {
@@ -292,7 +292,7 @@ export class MapVRenderer extends MapVBaseLayer {
292292

293293
/**
294294
* @function MapvRenderer.prototype.addAnimatorEvent
295-
* @description 添加动画事件
295+
* @description 添加动画事件
296296
*/
297297
addAnimatorEvent() {
298298
this.map.events.on({'movestart': this.animatorMovestartEvent.bind(this)});
@@ -301,24 +301,24 @@ export class MapVRenderer extends MapVBaseLayer {
301301

302302
/**
303303
* @function MapvRenderer.prototype.clear
304-
* @description 清除环境
305-
* @param context - {Object} 当前环境
304+
* @description 清除环境
305+
* @param {Object} context - 当前环境
306306
*/
307307
clear(context) {
308308
context && context.clearRect && context.clearRect(0, 0, context.canvas.width, context.canvas.height);
309309
}
310310

311311
/**
312312
* @function MapvRenderer.prototype.show
313-
* @description 展示渲染效果
313+
* @description 展示渲染效果
314314
*/
315315
show() {
316316
this.map.addLayer(this.canvasLayer);
317317
}
318318

319319
/**
320320
* @function MapvRenderer.prototype.hide
321-
* @description 隐藏渲染效果
321+
* @description 隐藏渲染效果
322322
*/
323323
hide() {
324324
this.map.removeLayer(this.canvasLayer);
@@ -327,7 +327,7 @@ export class MapVRenderer extends MapVBaseLayer {
327327

328328
/**
329329
* @function MapvRenderer.prototype.draw
330-
* @description 渲染绘制
330+
* @description 渲染绘制
331331
*/
332332
draw() {
333333
this.canvasLayer.redraw();

src/classic/services/AddressMatchService.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {AddressMatchService as CommonAddressMatchService} from '@supermap/iclien
77
* @category iServer AddressMatch
88
* @classdesc 地址匹配服务,包括正向匹配和反向匹配。
99
* @extends {SuperMap.REST.CommonServiceBase}
10-
* @param {string} url - 服务地址
11-
* @param {Object} options - 参数
10+
* @param {string} url - 服务地址
11+
* @param {Object} options - 参数
1212
*/
1313
export class AddressMatchService extends CommonServiceBase {
1414

@@ -19,9 +19,9 @@ export class AddressMatchService extends CommonServiceBase {
1919

2020
/**
2121
* @function SuperMap.REST.AddressMatchService.prototype.code
22-
* @description 正向匹配
23-
* @param {SuperMap.GeoCodingParameter} params - 正向匹配参数
24-
* @param {function} callback - 回调函数
22+
* @description 正向匹配
23+
* @param {SuperMap.GeoCodingParameter} params - 正向匹配参数
24+
* @param {function} callback - 回调函数
2525
*/
2626
code(params, callback) {
2727
var me = this;
@@ -40,9 +40,9 @@ export class AddressMatchService extends CommonServiceBase {
4040

4141
/**
4242
* @function SuperMap.REST.AddressMatchService.prototype.decode
43-
* @description 反向匹配
44-
* @param {SuperMap.GeoDeCodingParameter} params - 反向匹配参数
45-
* @param {function} callback - 回调函数
43+
* @description 反向匹配
44+
* @param {SuperMap.GeoDeCodingParameter} params - 反向匹配参数
45+
* @param {function} callback - 回调函数
4646
*/
4747
decode(params, callback) {
4848
var me = this;

0 commit comments

Comments
 (0)