Skip to content

Commit d3d843c

Browse files
committed
优化classic,mapboxgl,common的API review by songym
1 parent b9562ec commit d3d843c

File tree

84 files changed

+922
-938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+922
-938
lines changed

build/jsdocs/classic/docs.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
},
1717
"source": {
1818
"includePattern": ".+\\.js?$",
19-
"excludePattern": ".+\\\\src\\\\common\\\\iServer\\\\.*Service|Base|Parameters.js?$",
2019
"include": [
21-
"src/classic","src/common/thirdparty"
20+
"src/classic","src/common/thirdparty","src/common/iServer/CommonServiceBase.js",
21+
"src/common/iServer/GeoCodingParameter.js","src/common/iServer/GeoDecodingParameter.js"
2222
],
2323
"exclude": [
2424
"src/classic/libs","src/classic/theme","src/classic/resource"
2525
]
2626
},
27-
"plugins": ["plugins/markdown"],
27+
"plugins": ["plugins/markdown","../plugins/linkdoc"],
2828
"templates": {
2929
"cleverLinks": false,
3030
"monospaceLinks": false,

src/classic/overlay/MapVLayer.js

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,14 @@ import {MapVRenderer} from './mapv/MapVRenderer';
44
/**
55
* @class SuperMap.Layer.MapVLayer
66
* @category Visualization MapV
7-
* @classdesc MapV图层。
8-
* @extends SuperMap.Layer
9-
* @param name - {string} 图层名。
10-
* @param {Object} options - 可选参数,有如下两个参数:
11-
* @param {Mapv.DataSet} options.dataSet - mapv 的dataSet对象。
7+
* @classdesc MapV 图层。
8+
* @extends {SuperMap.Layer}
9+
* @param {string} name - 图层名。
10+
* @param {Object} options - 可选参数。
11+
* @param {Mapv.DataSet} options.dataSet - mapv 的 dataSet 对象。
12+
* @param {Object} options.options - mapv 绘图风格配置信息。
1213
*/
1314
export class MapVLayer extends SuperMap.Layer {
14-
15-
/*
16-
* @function SuperMap.Layer.MapVLayer.prototype.
17-
* @description
18-
* MapV支持webgl和普通canvas渲染.
19-
* 但目前本图层webgl渲染不能正确显示,待解决
20-
*
21-
* @param name
22-
* @param options 有两个参数<br>
23-
* * dataSet: mapv 的dataSet对象
24-
* * options: mapv 绘图风格配置信息
25-
*/
2615
constructor(name, options) {
2716
super(name, options);
2817

@@ -40,7 +29,7 @@ export class MapVLayer extends SuperMap.Layer {
4029

4130
/**
4231
* @member {boolean} - [SuperMap.Layer.MapVLayer.prototype.supported=false]
43-
* @description 当前浏览器是否支持canvas绘制。决定了MapV图是否可用,内部判断使用。
32+
* @description 当前浏览器是否支持 canvas 绘制。决定了 MapV 图是否可用,内部判断使用。
4433
*/
4534
this.supported = false;
4635

@@ -105,8 +94,8 @@ export class MapVLayer extends SuperMap.Layer {
10594
/**
10695
* @function SuperMap.Layer.MapVLayer.prototype.addData
10796
* @description 追加数据。
108-
* @param {mapv.DataSet} dataSet - mapv数据集
109-
* @param {Object} options - mapv绘图参数
97+
* @param {mapv.DataSet} dataSet - mapv 数据集
98+
* @param {Object} options - mapv 绘图参数
11099
*/
111100
addData(dataSet, options) {
112101
this.renderer && this.renderer.addData(dataSet, options);
@@ -116,8 +105,8 @@ export class MapVLayer extends SuperMap.Layer {
116105
/**
117106
* @function SuperMap.Layer.MapVLayer.prototype.
118107
* @description 设置数据。
119-
* @param {mapv.DataSet} dataSet - mapv数据集
120-
* @param {Object} options - mapv绘图参数
108+
* @param {mapv.DataSet} dataSet - mapv 数据集
109+
* @param {Object} options - mapv 绘图参数
121110
*/
122111
setData(dataSet, options) {
123112
this.renderer && this.renderer.setData(dataSet, options);
@@ -127,7 +116,7 @@ export class MapVLayer extends SuperMap.Layer {
127116
/**
128117
* @function SuperMap.Layer.MapVLayer.prototype.getData
129118
* @description 获取数据。
130-
* @returns {mapv.DataSet} - mapv数据集
119+
* @returns {mapv.DataSet} - mapv 数据集
131120
*/
132121
getData() {
133122
if (this.renderer) {
@@ -139,7 +128,7 @@ export class MapVLayer extends SuperMap.Layer {
139128
/**
140129
* @function SuperMap.Layer.MapVLayer.prototype.removeData
141130
* @description 删除符合过滤条件的数据。
142-
* @param {function} [filter] - 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除。
131+
* @param {function} filter - 过滤条件。条件参数为数据项,返回值为 true,表示删除该元素;否则表示不删除。
143132
* @example
144133
* filter=function(data){
145134
* if(data.id=="1"){
@@ -163,9 +152,9 @@ export class MapVLayer extends SuperMap.Layer {
163152

164153
/**
165154
* @function SuperMap.Layer.MapVLayer.prototype.setMap
166-
* @description 图层已经添加到Map中
167-
* 如果当前浏览器支持canvas,则开始渲染要素;如果不支持则移除图层。
168-
* @param {SuperMap.Map} map - 需要绑定的map对象
155+
* @description 图层已经添加到 Map 中
156+
* 如果当前浏览器支持 canvas,则开始渲染要素;如果不支持则移除图层。
157+
* @param {SuperMap.Map} map - 需要绑定的 map 对象
169158
*/
170159
setMap(map) {
171160
super.setMap(map);
@@ -179,8 +168,8 @@ export class MapVLayer extends SuperMap.Layer {
179168

180169
/**
181170
* @function SuperMap.Layer.MapVLayer.prototype.moveTo
182-
* @description 重置当前MapV图层的div,再一次与Map控件保持一致
183-
* 修改当前显示范围,当平移或者缩放结束后开始重绘MapV图的渲染效果
171+
* @description 重置当前 MapV 图层的 div,再一次与 Map 控件保持一致
172+
* 修改当前显示范围,当平移或者缩放结束后开始重绘 MapV 图的渲染效果
184173
* @param {SuperMap.Bounds} bounds - 图层范围。
185174
* @param {boolean} [zoomChanged] - 缩放级别是否改变。
186175
* @param {boolean} [dragging] - 是否拖动。
@@ -221,7 +210,7 @@ export class MapVLayer extends SuperMap.Layer {
221210
/**
222211
* @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng
223212
* @description 将经纬度转成底图的投影坐标。
224-
* @param {SuperMap.Lonlat} [latLng] - 经纬度坐标。
213+
* @param {SuperMap.Lonlat} latLng - 经纬度坐标。
225214
*/
226215
transferToMapLatLng(latLng) {
227216
var source = "EPSG:4326", dest = "EPSG:4326";

src/classic/overlay/mapv/MapVRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class MapVRenderer extends MapVBaseLayer {
136136
/**
137137
* @function MapvRenderer.prototype.removeData
138138
* @description 删除符合过滤条件的数据。
139-
* @param {function} [filter] - 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除。
139+
* @param {function} [filter] - 过滤条件。条件参数为数据项,返回值为 true,表示删除该元素;否则表示不删除。
140140
*/
141141
removeData(filter) {
142142
if (!this.dataSet) {

src/classic/services/AddressMatchService.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {AddressMatchService as CommonAddressMatchService} from '@supermap/iclien
66
* @class SuperMap.REST.AddressMatchService
77
* @category iServer AddressMatch
88
* @classdesc 地址匹配服务,包括正向匹配和反向匹配。
9-
* @extends {SuperMap.REST.CommonServiceBase}
9+
* @extends {SuperMap.CommonServiceBase}
1010
* @param {string} url - 服务地址。
1111
* @param {Object} options - 参数。
1212
*/
@@ -21,7 +21,7 @@ export class AddressMatchService extends CommonServiceBase {
2121
* @function SuperMap.REST.AddressMatchService.prototype.code
2222
* @description 正向匹配。
2323
* @param {SuperMap.GeoCodingParameter} params - 正向匹配参数。
24-
* @param {function} callback - 回调函数。
24+
* @param {RequestCallback} callback - 回调函数。
2525
*/
2626
code(params, callback) {
2727
var me = this;
@@ -41,8 +41,8 @@ export class AddressMatchService extends CommonServiceBase {
4141
/**
4242
* @function SuperMap.REST.AddressMatchService.prototype.decode
4343
* @description 反向匹配。
44-
* @param {SuperMap.GeoDeCodingParameter} params - 反向匹配参数。
45-
* @param {function} callback - 回调函数。
44+
* @param {SuperMap.GeoDecodingParameter} params - 反向匹配参数。
45+
* @param {RequestCallback} callback - 回调函数。
4646
*/
4747
decode(params, callback) {
4848
var me = this;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy