Skip to content

Commit ff841a0

Browse files
优化jsAPI
1 parent 373a3a5 commit ff841a0

36 files changed

+495
-425
lines changed

src/classic/services/AddressMatchService.js

Lines changed: 4 additions & 4 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 url - {string} 服务地址
11-
* @param options - {Object} 地址匹配服务可选参数
10+
* @param {string} url - 服务地址
11+
* @param {Object} options - 地址匹配服务可选参数
1212
*/
1313
export class AddressMatchService extends CommonServiceBase {
1414

@@ -20,7 +20,7 @@ export class AddressMatchService extends CommonServiceBase {
2020
/**
2121
* @function SuperMap.REST.AddressMatchService.prototype.code
2222
* @description 正向匹配
23-
* @param params - {SuperMap.GeoCodingParameter} 正向匹配参数
23+
* @param {SuperMap.GeoCodingParameter} params - 正向匹配参数
2424
* @param callback - {function} 回调函数
2525
*/
2626
code(params, callback) {
@@ -41,7 +41,7 @@ export class AddressMatchService extends CommonServiceBase {
4141
/**
4242
* @function SuperMap.REST.AddressMatchService.prototype.decode
4343
* @description 反向匹配
44-
* @param params - {SuperMap.GeoDeCodingParameter} 反向匹配参数
44+
* @param {SuperMap.GeoDeCodingParameter} params - 反向匹配参数
4545
* @param callback - {function} 回调函数
4646
*/
4747
decode(params, callback) {

src/common/iServer/GeometryBatchAnalystService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class GeometryBatchAnalystService extends SpatialAnalystBase {
4040
/**
4141
* @function SuperMap.GeometryBatchAnalystService.prototype.processAsync
4242
* @description 负责将客户端的查询参数传递到服务端。
43-
* @params {SuperMap.GeometryBatchOverlayAnalystParameters} parameter - 批量几何对象叠加分析参数类
43+
* @param {SuperMap.GeometryBatchOverlayAnalystParameters} parameter - 批量几何对象叠加分析参数类
4444
*
4545
*/
4646
processAsync(parameters) {

src/leaflet/services/AddressMatchService.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import {AddressMatchService as CommonMatchAddressService} from '@supermap/iclien
1414
* .code(function(result){
1515
* //doSomething
1616
* })
17-
* @param url - {string} 地址匹配服务地址
18-
* @param options {Object} 地址匹配服务可选参数。如:data - {number}
19-
*
17+
* @param {string} url - 地址匹配服务地址。
18+
* @param {Object} options - 地址匹配服务可选参数。
19+
* @param {string} options.proxy - 服务代理地址。
20+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
21+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
2022
*/
2123
export var AddressMatchService = ServiceBase.extend({
2224

@@ -27,7 +29,7 @@ export var AddressMatchService = ServiceBase.extend({
2729
/**
2830
* @function L.supermap.addressMatchService.prototype.code
2931
* @description 获取正向地址匹配结果。
30-
* @param params - {Object} 正向匹配参数。
32+
* @param {SuperMap.GeoCodingParameter} params - 正向匹配参数。
3133
* @param {RequestCallback} callback 请求结果的回调函数。
3234
*/
3335
code: function (params, callback) {
@@ -48,7 +50,7 @@ export var AddressMatchService = ServiceBase.extend({
4850
/**
4951
* @function L.supermap.addressMatchService.prototype.decode
5052
* @description 获取反向地址匹配结果。
51-
* @param params -{Object} 反向匹配参数。
53+
* @param {SuperMap.GeoDecodingParameter} params - 反向匹配参数。
5254
* @param {RequestCallback} callback 请求结果的回调函数。
5355
*/
5456
decode: function (params, callback) {

src/leaflet/services/ChartService.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import {CommontypesConversion} from '../core/CommontypesConversion';
1414
* .queryChart(param,function(result){
1515
* //doSomething
1616
* })
17-
* @param url - {string} 与客户端交互的海图服务地址。
18-
* @param options -{Object} 可选参数。如:<br>
19-
* serverType - {{@link SuperMap.ServerType}} 服务来源 iServer|iPortal|online
17+
* @param {string} url - 与客户端交互的海图服务地址。
18+
* @param {Object} options - 可选参数
19+
* @param {string} options.proxy - 服务代理地址。
20+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
21+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
2022
*/
2123
export var ChartService = ServiceBase.extend({
2224

@@ -27,9 +29,9 @@ export var ChartService = ServiceBase.extend({
2729
/**
2830
* @function L.supermap.chartService.prototype.queryChart
2931
* @description 查询海图
30-
* @param params -{SuperMap.ChartQueryParameters} 海图查询所需参数类。
31-
* @param {RequestCallback} callback 回调函数。
32-
* @param resultFormat -{SuperMap.DataFormat} 返回的结果格式类型。
32+
* @param {SuperMap.ChartQueryParameters} params - 海图查询所需参数类。
33+
* @param {RequestCallback} callback - 回调函数。
34+
* @param {SuperMap.DataFormat} resultFormat - 返回的结果格式类型。
3335
*/
3436
queryChart: function (params, callback, resultFormat) {
3537
var me = this,

src/leaflet/services/DataFlowService.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import {DataFlowService as DataFlow} from '@supermap/iclient-common';
88
* @classdesc 实时数据服务类
99
* @category iServer DataFlow
1010
* @extends L.supermap.ServiceBase
11-
* @param url - {string} 实时数据服务地址
12-
* @param options - {Object} 加载实时数据可选参数。如:<br>
13-
* serverType - {{@link SuperMap.ServerType}} 服务来源 iServer|iPortal|online。<br>
14-
* style - {function} 设置数据加载样式。<br>
15-
* onEachFeature - {function} 设置每个数据加载popup等。<br>
16-
* geometry - {Array<Object>} 设置增添的几何要素对象数组。<br>
17-
* excludeField - -{Object} 排除字段
11+
* @param {string} url - 实时数据服务地址
12+
* @param {Object} options - 加载实时数据可选参数。
13+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
14+
* @param {Function} options.style - 设置数据加载样式。
15+
* @param {Function} options.onEachFeature - 设置每个数据加载popup等。
16+
* @param {Array.<Object>} options.geometry - 设置增添的几何要素对象数组。
17+
* @param {Object} options.excludeField - 排除字段
1818
*/
1919
export var DataFlowService = ServiceBase.extend({
2020

@@ -57,7 +57,7 @@ export var DataFlowService = ServiceBase.extend({
5757
/**
5858
* @function L.supermap.dataFlowService.prototype.broadcast
5959
* @description 加载广播数据
60-
* @param obj {JSONObject} json格式的要素数据
60+
* @param {JSONObject} obj - json格式的要素数据
6161
*/
6262
broadcast: function (obj) {
6363
this.dataFlow.broadcast(obj);
@@ -76,7 +76,7 @@ export var DataFlowService = ServiceBase.extend({
7676
/**
7777
* @function L.supermap.dataFlowService.prototype.setExcludeField
7878
* @description 设置排除字段
79-
* @param excludeField - {Object} 排除字段
79+
* @param {Object} excludeField - 排除字段
8080
*/
8181
setExcludeField: function (excludeField) {
8282
this.dataFlow.setExcludeField(excludeField);
@@ -87,7 +87,7 @@ export var DataFlowService = ServiceBase.extend({
8787
/**
8888
* @function L.supermap.dataFlowService.prototype.setGeometry
8989
* @description 设置添加的GeoJSON几何要素数据
90-
* @param geometry - {Array<Object>} 设置增添的GeoJSON几何要素对象数组。
90+
* @param {Array<Object>} geometry - 设置增添的GeoJSON几何要素对象数组。
9191
*/
9292
setGeometry: function (geometry) {
9393
this.dataFlow.setGeometry(geometry);

src/leaflet/services/FeatureService.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ import {
2323
* //doSomething
2424
* })
2525
* @extends L.supermap.ServiceBase
26-
* @param url - {string} 要素数据集服务地址
27-
* @param options - {Object} 创建要素数据集服务类可选参数。如:<br>
28-
* serverType - {{@link SuperMap.ServerType}} 服务来源 iServer|iPortal|online
26+
* @param {string} url - 要素数据集服务地址
27+
* @param {Object} options - 创建要素数据集服务类可选参数。
28+
* @param {string} options.proxy - 服务代理地址。
29+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
30+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
2931
*/
3032
export var FeatureService = ServiceBase.extend({
3133

@@ -36,9 +38,9 @@ export var FeatureService = ServiceBase.extend({
3638
/**
3739
* @function L.supermap.featureService.prototype.getFeaturesByIDs
3840
* @description 数据集ID查询服务
39-
* @param params {SuperMap.GetFeaturesByIDsParameters} ID 查询参数类
41+
* @param {SuperMap.GetFeaturesByIDsParameters} params ID 查询参数类
4042
* @param {RequestCallback} callback 回调函数
41-
* @param resultFormat {SuperMap.DataFormat} 返回结果类型
43+
* @param {SuperMap.DataFormat} resultFormat 返回结果类型
4244
*/
4345
getFeaturesByIDs: function (params, callback, resultFormat) {
4446
var me = this;
@@ -59,9 +61,9 @@ export var FeatureService = ServiceBase.extend({
5961
/**
6062
* @function L.supermap.featureService.prototype.getFeaturesByBounds
6163
* @description 数据集Bounds查询服务
62-
* @param params {SuperMap.GetFeaturesByBoundsParameters} 数据集范围查询参数类
63-
* @param {RequestCallback} callback 回调函数
64-
* @param resultFormat {SuperMap.DataFormat} 返回结果类型
64+
* @param {SuperMap.GetFeaturesByBoundsParameters} params - 数据集范围查询参数类
65+
* @param {RequestCallback} callback - 回调函数
66+
* @param {SuperMap.DataFormat} resultFormat - 返回结果类型
6567
*/
6668
getFeaturesByBounds: function (params, callback, resultFormat) {
6769
var me = this;
@@ -81,9 +83,9 @@ export var FeatureService = ServiceBase.extend({
8183
/**
8284
* @function L.supermap.featureService.prototype.getFeaturesByBuffer
8385
* @description 数据集Buffer查询服务
84-
* @param params {SuperMap.GetFeaturesByBufferParameters} 数据服务中数据集缓冲区查询参数类
85-
* @param {RequestCallback} callback 回调函数
86-
* @param resultFormat {SuperMap.DataFormat} 返回结果类型
86+
* @param {SuperMap.GetFeaturesByBufferParameters} params - 数据服务中数据集缓冲区查询参数类
87+
* @param {RequestCallback} callback - 回调函数
88+
* @param {SuperMap.DataFormat} resultFormat - 返回结果类型
8789
*/
8890
getFeaturesByBuffer: function (params, callback, resultFormat) {
8991
var me = this;
@@ -103,9 +105,9 @@ export var FeatureService = ServiceBase.extend({
103105
/**
104106
* @function L.supermap.featureService.prototype.getFeaturesBySQL
105107
* @description 数据集SQL查询服务
106-
* @param params {SuperMap.GetFeaturesBySQLParameters} 数据服务中数据集SQL查询参数类
108+
* @param {SuperMap.GetFeaturesBySQLParameters} params - 数据服务中数据集SQL查询参数类
107109
* @param {RequestCallback} callback 回调函数
108-
* @param resultFormat {SuperMap.DataFormat} 返回结果类型
110+
* @param {SuperMap.DataFormat} resultFormat - 返回结果类型
109111
*/
110112
getFeaturesBySQL: function (params, callback, resultFormat) {
111113
var me = this;
@@ -125,9 +127,9 @@ export var FeatureService = ServiceBase.extend({
125127
/**
126128
* @function L.supermap.featureService.prototype.getFeaturesByGeometry
127129
* @description 数据集几何查询服务类
128-
* @param params {SuperMap.GetFeaturesByGeometryParameters} 数据集几何查询参数类
130+
* @param {SuperMap.GetFeaturesByGeometryParameters} params - 数据集几何查询参数类
129131
* @param {RequestCallback} callback 回调函数
130-
* @param resultFormat {SuperMap.DataFormat} 返回结果类型
132+
* @param {SuperMap.DataFormat} resultFormat - 返回结果类型
131133
*/
132134
getFeaturesByGeometry: function (params, callback, resultFormat) {
133135
var me = this;
@@ -147,7 +149,7 @@ export var FeatureService = ServiceBase.extend({
147149
/**
148150
* @function L.supermap.featureService.prototype.editFeatures
149151
* @description 地物编辑服务
150-
* @param params {SuperMap.EditFeaturesParameters} 数据服务中数据集添加、修改、删除参数类
152+
* @param {SuperMap.EditFeaturesParameters} params 数据服务中数据集添加、修改、删除参数类
151153
* @param {RequestCallback} callback 回调函数
152154
*/
153155
editFeatures: function (params, callback) {

src/leaflet/services/FieldService.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import {GetFieldsService, FieldStatisticService, FieldStatisticsParameters} from
1212
* L.supermap.fieldService(url).getFields(function(result){
1313
* //doSomething
1414
* });
15-
* @param url - {string} 字段服务地址
16-
* @param options - {Object} 字段服务类可选参数。如:<br>
17-
* serverType - {{@link SuperMap.ServerType}} 服务来源 iServer|iPortal|online。<br>
18-
* dataSourceName - {string} 数据资源名称 <br>
19-
* dataSetName - {string} 数据集名称
15+
* @param {string} url - 字段服务地址。
16+
* @param {Object} options - 字段服务类可选参数。
17+
* @param {string} options.proxy - 服务代理地址。
18+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
19+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
20+
* @param {string} options.dataSourceName - 数据资源名称。
21+
* @param {string} options.dataSetName - 数据集名称。
2022
*/
2123
export var FieldService = ServiceBase.extend({
2224

@@ -27,7 +29,7 @@ export var FieldService = ServiceBase.extend({
2729
/**
2830
* @function L.supermap.fieldService.prototype.getFields
2931
* @description 字段查询服务
30-
* @param params {SuperMap.FieldParameters} 字段信息查询参数类
32+
* @param {SuperMap.FieldParameters} params - 字段信息查询参数类
3133
* @param {RequestCallback} callback 回调函数
3234
*/
3335
getFields: function (params, callback) {
@@ -50,8 +52,8 @@ export var FieldService = ServiceBase.extend({
5052
/**
5153
* @function L.supermap.fieldService.prototype.getFieldStatisticsInfo
5254
* @description 字段统计服务
53-
* @param params {SuperMap.FieldStatisticsParameters} 字段统计信息查询参数类
54-
* @param {RequestCallback} callback 回调函数
55+
* @param {SuperMap.FieldStatisticsParameters} params - 字段统计信息查询参数类
56+
* @param {RequestCallback} callback - 回调函数
5557
*/
5658
getFieldStatisticsInfo: function (params, callback) {
5759
if (!(params instanceof FieldStatisticsParameters)) {

src/leaflet/services/GridCellInfosService.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import {GetGridCellInfosService, GetGridCellInfosParameters} from '@supermap/icl
1313
* .getGridCellInfos(param,function(result){
1414
* //doSomething
1515
* })
16-
* @param url - {string} 数据栅格查询服务地址
17-
* @param options - {Object} 数据栅格查询服务类可选参数。如:<br>
18-
* serverType - {{@link SuperMap.ServerType}} 服务来源 iServer|iPortal|online。<br>
16+
* @param {string} url - 数据栅格查询服务地址。
17+
* @param {Object} options - 数据栅格查询服务类可选参数。
18+
* @param {string} options.proxy - 服务代理地址。
19+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
20+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
1921
*/
2022
export var GridCellInfosService = ServiceBase.extend({
2123

src/leaflet/services/LayerInfoService.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ import {
2020
* L.supermap.layerInfoService(url).getLayersInfo(function(result){
2121
* //doSomething
2222
* })
23-
* @param url - {string} 与服务端交互的地图服务地址。请求地图服务URL 应为:http://{服务器地址}:{服务端口号}/iserver/services/{地图服务名}/rest/maps/{地图名}";
24-
* @param options - {Object} 交互服务时所需可选参数。如:<br>
25-
* serverType - {{@link SuperMap.ServerType}} 服务来源 iServer|iPortal|online。<br>
26-
* eventListeners - {Object} 需要被注册的监听器对象。
23+
* @param {string} url - 与服务端交互的地图服务地址。请求地图服务URL 应为:http://{服务器地址}:{服务端口号}/iserver/services/{地图服务名}/rest/maps/{地图名}";
24+
* @param {Object} options - 交互服务时所需可选参数.
25+
* @param {string} options.proxy - 服务代理地址。
26+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
27+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
2728
*/
2829
export var LayerInfoService = ServiceBase.extend({
2930

@@ -53,7 +54,7 @@ export var LayerInfoService = ServiceBase.extend({
5354
/**
5455
* @function L.supermap.layerInfoService.prototype.setLayerInfo
5556
* @description 设置图层信息服务。可以实现临时图层中子图层的修改
56-
* @param params - {SuperMap.SetLayerInfoParameters} 图层信息相关参数
57+
* @param {SuperMap.SetLayerInfoParameters} params - 图层信息相关参数
5758
* @param {RequestCallback} callback 回调函数
5859
*/
5960
setLayerInfo: function (params, callback) {
@@ -87,7 +88,7 @@ export var LayerInfoService = ServiceBase.extend({
8788
/**
8889
* @function L.supermap.layerInfoService.prototype.setLayersInfo
8990
* @description 设置图层信息。可以实现创建新的临时图层和对现有临时图层的修改
90-
* @param params -{SuperMap.SetLayersInfoParameters} 图层信息设置参数,包括临时图层。
91+
* @param {SuperMap.SetLayersInfoParameters} params - 图层信息设置参数,包括临时图层。
9192
* @param {RequestCallback} callback 回调函数
9293
*/
9394
setLayersInfo: function (params, callback) {
@@ -120,7 +121,7 @@ export var LayerInfoService = ServiceBase.extend({
120121
/**
121122
* @function L.supermap.layerInfoService.prototype.setLayerStatus
122123
* @description 负责将子图层显示控制参数传递到服务端,并获取服务端返回的图层显示状态。
123-
* @param params -{SuperMap.SetLayerStatusParameters} 图层信息显示控制参数
124+
* @param {SuperMap.SetLayerStatusParameters} params - 图层信息显示控制参数
124125
* @param {RequestCallback} callback 回调函数
125126
*/
126127
setLayerStatus: function (params, callback) {

src/leaflet/services/MapService.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import {MapService as CommonMapService, TilesetsService} from '@supermap/iclient
88
* @classdesc 地图信息服务类
99
* @category iServer Map
1010
* @extends L.supermap.ServiceBase
11-
* @param url -{string} 地图服务地址
12-
* @param options -{Object} 地图服务信息相关参数。如:<br>
13-
* serverType - {{@link SuperMap.ServerType}} 服务来源 iServer|iPortal|online
11+
* @param {string} url - 地图服务地址
12+
* @param {Object} options - 地图服务信息相关参数。
13+
* @param {string} options.proxy - 服务代理地址。
14+
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务来源 iServer|iPortal|online。
15+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
1416
* @example
1517
* L.supermap.mapService(url)
1618
* .getMapInfo(function(result){

0 commit comments

Comments
 (0)