Skip to content

Commit 942b68c

Browse files
committed
common 下 api 参数优化 review by songym
1 parent 0b1558d commit 942b68c

File tree

140 files changed

+588
-635
lines changed

Some content is hidden

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

140 files changed

+588
-635
lines changed

src/common/format/GeoJSON.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ export class GeoJSON extends JSONFormat {
359359
* @param {Function} filter - 对象中每个层次每个键值对都会调用此函数得出一个结果。每个值都会被 filter 函数的结果所替换掉。这个函数可被用来将某些对象转化成某个类相应的对象,或者将日期字符串转化成Date对象。
360360
* @param {string} [type='FeaureCollection'] - 可选的字符串,它决定了输出的格式。支持的值有:"Geometry","Feature",和 "FeatureCollection",如果此值为null。
361361
* @returns {Object} 返回值依赖于 type 参数的值。
362-
* -如果 type 等于 "FeatureCollection",返回值将会是 {@link SuperMap.Feature.Vector}> 数组。
362+
* -如果 type 等于 "FeatureCollection",返回值将会是 {@link SuperMap.Feature.Vector} 数组。
363363
* -如果 type 为 "Geometry",输入的 JSON 对象必须表示一个唯一的几何体,然后返回值就会是 {@link SuperMap.Feature.Geometry}。
364-
* -如果 type 为 "Feature",输入的 JSON 对象也必须表示的一个要素,这样返回值才会是 {@link SuperMap.Feature.Vector}>
364+
* -如果 type 为 "Feature",输入的 JSON 对象也必须表示的一个要素,这样返回值才会是 {@link SuperMap.Feature.Vector}。
365365
*/
366366

367367
read(json, type, filter) {

src/common/iServer/AreaSolarRadiationParameters.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,28 @@ import {Util} from '../commontypes/Util';
1919
* @param {number} [options.hourStart] - 起始时间(一天中的第几个小时)。
2020
* @param {number} [options.hourEnd] - 结束时间(一天中的第几个小时)。
2121
* @param {number} [options.transmittance] - 太阳辐射穿过大气的透射率。
22-
* @param {number} [options.hourInterval=0.5] - 计算时的小时间隔(设置的越小计算量越大并且计算结果更精确, 默认为0.5小时,如果修改此参数,必须使用整数)。
23-
* @param {number} [options.dayInterval=5] - 计算时的天数间隔(设置的越小计算量越大并且计算结果更精确, 默认为5天,必须使用整数)。
22+
* @param {number} [options.hourInterval=0.5] - 计算时的小时间隔(设置的越小计算量越大并且计算结果更精确,如果修改此参数,必须使用整数)。
23+
* @param {number} [options.dayInterval=5] - 计算时的天数间隔(设置的越小计算量越大并且计算结果更精确,必须使用整数)。
2424
* @param {boolean} [options.deleteExistResultDataset=false] - 如果用户命名的结果数据集名称与已有的数据集重名,是否删除已有的数据集。
2525
*/
2626
export class AreaSolarRadiationParameters {
2727

2828
constructor(options) {
2929
/**
3030
* @member {string} SuperMap.AreaSolarRadiationParameters.prototype.dataset
31-
* @description 要用来做地区太阳辐射数据源中数据集的名称(必设参数)。该名称用形如"数据集名称@数据源别名"形式来表示,例如:JingjinTerrain@Jingjin。注:地区太阳辐射数据必须为栅格数据集。
31+
* @description 要用来做地区太阳辐射数据源中数据集的名称。该名称用形如数据集名称@数据源别名形式来表示,例如:JingjinTerrain@Jingjin。注:地区太阳辐射数据必须为栅格数据集。
3232
*/
3333
this.dataset = null;
3434

3535
/**
3636
* @member {string} SuperMap.AreaSolarRadiationParameters.prototype.targetDatasourceName
37-
* @description 指定的存储结果数据集的数据源名称(必设参数),例如:"Jingjin"。
37+
* @description 指定的存储结果数据集的数据源名称,例如:"Jingjin"。
3838
*/
3939
this.targetDatasourceName = null;
4040

4141
/**
4242
* @member {string} SuperMap.AreaSolarRadiationParameters.prototype.totalGridName
43-
* @description 指定地区太阳辐射总辐射量数据集的名称(必设参数)
43+
* @description 指定地区太阳辐射总辐射量数据集的名称。
4444
*/
4545
this.totalGridName = null;
4646

@@ -76,13 +76,13 @@ export class AreaSolarRadiationParameters {
7676

7777
/**
7878
* @member {number} SuperMap.AreaSolarRadiationParameters.prototype.dayStart
79-
* @description 起始日期(年内的第几天),必设参数
79+
* @description 起始日期(年内的第几天)。
8080
*/
8181
this.dayStart = null;
8282

8383
/**
8484
* @member {number} SuperMap.AreaSolarRadiationParameters.prototype.dayEnd
85-
* @description 结束日期(年内的第几天),必设参数
85+
* @description 结束日期(年内的第几天)。
8686
*/
8787
this.dayEnd = null;
8888

@@ -118,7 +118,7 @@ export class AreaSolarRadiationParameters {
118118

119119
/**
120120
* @member {boolean} [SuperMap.AreaSolarRadiationParameters.prototype.deleteExistResultDataset=false]
121-
* @description 如果用户命名的结果数据集名称与已有的数据集重名,是否删除已有的数据集。\
121+
* @description 如果用户命名的结果数据集名称与已有的数据集重名,是否删除已有的数据集。
122122
*/
123123
this.deleteExistResultDataset = false;
124124

src/common/iServer/BufferAnalystParameters.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import {BufferSetting} from './BufferSetting';
66
* @class SuperMap.BufferAnalystParameters
77
* @category iServer SpatialAnalyst BufferAnalyst
88
* @classdesc 缓冲区分析参数基类。
9-
* @param {Object} options - 参数。
10-
* @param {SuperMap.BufferSetting} options.bufferSetting - 设置缓冲区通用参数。为缓冲区分析提供必要的参数信息,包括左缓冲距离、右缓冲距离、端点类型、圆头缓冲圆弧处线段的个数信息。
9+
* @param {Object} options - 参数。
10+
* @param {SuperMap.BufferSetting} [options.bufferSetting] - 设置缓冲区通用参数。为缓冲区分析提供必要的参数信息,包括左缓冲距离、右缓冲距离、端点类型、圆头缓冲圆弧处线段的个数信息。
1111
*/
1212
export class BufferAnalystParameters {
1313

1414

1515
constructor(options) {
1616
var me = this;
1717
/**
18-
* @member {SuperMap.BufferSetting} SuperMap.BufferAnalystParameters.prototype.bufferSetting
18+
* @member {SuperMap.BufferSetting} [SuperMap.BufferAnalystParameters.prototype.bufferSetting]
1919
* @description 设置缓冲区通用参数。为缓冲区分析提供必要的参数信息,包括左缓冲距离、右缓冲距离、端点类型、圆头缓冲圆弧处线段的个数信息。
2020
*/
2121
me.bufferSetting = new BufferSetting();

src/common/iServer/BufferDistance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {Util} from '../commontypes/Util';
55
* @class SuperMap.BufferDistance
66
* @category iServer SpatialAnalyst BufferAnalyst
77
* @classdesc 缓冲区分析的缓冲距离类。通过该类可以设置缓冲区分析的缓冲距离,距离可以是数值也可以是数值型的字段表达式。
8-
* @param {Object} options - 参数。
8+
* @param {Object} options - 参数。
99
* @param {string} [options.exp] - 以数值型的字段表达式作为缓冲区分析的距离值。
1010
* @param {number} [options.value=100] - 以数值作为缓冲区分析的距离值。单位:米。
1111
*/

src/common/iServer/BurstPipelineAnalystParameters.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {Util} from '../commontypes/Util';
66
* @category iServer NetworkAnalyst BurstAnalyse
77
* @classdesc 爆管分析参数类。
88
* @param {Object} options - 参数。
9-
* @param {Array.<number>} options.sourceNodeIDs - 指定的设施点ID数组
9+
* @param {Array.<number>} options.sourceNodeIDs - 指定的设施点 ID 数组
1010
* @param {number} [options.edgeID] - 指定的弧段ID,edgeID 与 nodeID 必须指定一个。
1111
* @param {number} [options.nodeID] - 指定的结点ID,edgeID 与 nodeID 必须指定一个。
1212
* @param {boolean} [options.isUncertainDirectionValid=false] - 指定不确定流向是否有效。
@@ -18,19 +18,19 @@ export class BurstPipelineAnalystParameters {
1818
var me = this;
1919
/**
2020
* @member {Array.<number>} SuperMap.BurstPipelineAnalystParameters.prototype.sourceNodeIDs
21-
* @description 指定的设施点ID数组
21+
* @description 指定的设施点 ID 数组
2222
*/
2323
this.sourceNodeIDs = null;
2424

2525
/**
2626
* @member {number} [SuperMap.BurstPipelineAnalystParameters.prototype.edgeID]
27-
* @description 指定的弧段ID,edgeID 与 nodeID 必须指定一个。
27+
* @description 指定的弧段 ID,edgeID 与 nodeID 必须指定一个。
2828
*/
2929
this.edgeID = null;
3030

3131
/**
3232
* @member {number} [SuperMap.BurstPipelineAnalystParameters.prototype.nodeID]
33-
* @description 指定的结点ID,edgeID 与 nodeID 必须指定一个。
33+
* @description 指定的结点 ID,edgeID 与 nodeID 必须指定一个。
3434
*/
3535
this.nodeID = null;
3636

src/common/iServer/ChartQueryFilterParameter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import {Util} from '../commontypes/Util';
66
* @category iServer Map Chart
77
* @classdesc 海图查询过滤参数类,用于设置海图查询的过滤参数。包括:物标代码、物标可应用对象的选择(是否查询点、线或面)、属性字段过滤条件。
88
* @param {Object} options - 参数。
9+
* @param {string} options.attributeFilter - 属性字段过滤条件。
10+
* @param {number} options.chartFeatureInfoSpecCode - 查询的物标代号。
911
* @param {boolean} [options.isQueryPoint] - 是否查询点。
1012
* @param {boolean} [options.isQueryLine] - 是否查询线。
1113
* @param {boolean} [options.isQueryRegion] - 是否查询面。
12-
* @param {string} options.attributeFilter - 属性字段过滤条件。
13-
* @param {number} options.chartFeatureInfoSpecCode - 查询的物标代号。
1414
*/
1515
export class ChartQueryFilterParameter {
1616

src/common/iServer/ChartQueryParameters.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import {ChartQueryFilterParameter} from './ChartQueryFilterParameter';
99
* 必设属性有:queryMode、chartLayerNames、chartQueryFilterParameters。当进行海图范围查询时,必设属性还包括 bounds。
1010
* @param {Object} options - 参数。
1111
* @param {string} options.queryMode - 海图查询模式类型,支持两种查询方式:海图属性查询("ChartAttributeQuery")和海图空间查询("ChartBoundsQuery")。
12-
* @param {(SuperMap.Bounds|L.Bounds|ol.extent)} [options.bounds] - 海图查询范围。当进行海图范围查询时,此参数为必选。
1312
* @param {Array.<string>} options.chartLayerNames - 查询的海图图层的名称。
14-
* @param {Array.<{SuperMap.ChartQueryFilterParameter}>} [options.chartQueryFilterParameters] - 海图查询过滤参数。包括:物标代码、物标可应用对象的选择(是否查询点、线或面)、属性字段过滤条件。
13+
* @param {Array.<{SuperMap.ChartQueryFilterParameter}>} options.chartQueryFilterParameters - 海图查询过滤参数。包括:物标代码、物标可应用对象的选择(是否查询点、线或面)、属性字段过滤条件。
14+
* @param {(SuperMap.Bounds|L.Bounds|ol.extent)} [options.bounds] - 海图查询范围。当进行海图范围查询时,此参数为必选。
1515
* @param {boolean} [options.returnContent=true] - 获取或设置是返回查询结果记录集 recordsets,还是返回查询结果的资源 resourceInfo。
1616
* @param {number} [options.startRecord=0] - 查询起始记录位置。
1717
* @param {number} [options.expectCount] - 期望查询结果返回的记录数,该值大于0。

src/common/iServer/ClipParameter.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import {ServerGeometry} from './ServerGeometry';
77
* @category iServer SpatialAnalyst Interpolation
88
* @classdesc 用于裁剪的参数。
99
* @description 优先使用用户指定的裁剪区域多边形进行裁剪,也可以通过指定数据源和数据集名,从而使用指定数据集的边界多边形进行裁剪。
10-
* @param {Object} options - 参数。
11-
* @param {string} options.clipDatasetName - 裁剪的数据集名。
12-
* @param {string} options.clipDatasourceName - 裁剪的数据集所在数据源的名字。
13-
* @param {(SuperMap.Geometry.Polygon|L.Polygon|L.GeoJSON|ol.geom.Polygon|ol.format.GeoJSON)} options.clipRegion - 用户指定的裁剪区域。</br>
14-
* @param {boolean} [options.isClipInRegion=false] - 是否对裁剪区内的数据集进行裁剪。
10+
* @param {Object} options - 参数。
11+
* @param {string} [options.clipDatasetName] - 裁剪的数据集名。
12+
* @param {string} [options.clipDatasourceName] - 裁剪的数据集所在数据源的名字。
13+
* @param {(SuperMap.Geometry.Polygon|L.Polygon|L.GeoJSON|ol.geom.Polygon|ol.format.GeoJSON)} [options.clipRegion] - 用户指定的裁剪区域。
14+
* @param {boolean} [options.isClipInRegion=true] - 是否对裁剪区内的数据集进行裁剪。
1515
* @param {boolean} [options.isExactClip=true] - 是否使用精确裁剪。
1616
*/
1717
export class ClipParameter {
@@ -20,27 +20,27 @@ export class ClipParameter {
2020
constructor(options) {
2121
/**
2222
* @member {string} SuperMap.ClipParameter.prototype.clipDatasetName
23-
* @description 用于裁剪的数据集名,当clipRegion不设置时起作用
23+
* @description 用于裁剪的数据集名,clipDatasetName 与 clipRegion 必须设置一个
2424
*/
2525
this.clipDatasetName = null;
2626

2727
/**
2828
* @member {string} SuperMap.ClipParameter.prototype.clipDatasourceName
29-
* @description 用于裁剪的数据集所在数据源的名字。
29+
* @description 用于裁剪的数据集所在数据源的名字。当 clipRegion 不设置时起作用。
3030
*/
3131
this.clipDatasourceName = null;
3232

3333
/**
3434
* @member {(SuperMap.Geometry.Polygon|L.Polygon|L.GeoJSON|ol.geom.Polygon|ol.format.GeoJSON)} SuperMap.ClipParameter.prototype.clipRegion
35-
* @description 用户指定的裁剪区域,优先使用
35+
* @description 用户指定的裁剪区域,优先使用,clipDatasetName 与 clipRegion 必须设置一个。
3636
*/
3737
this.clipRegion = null;
3838

3939
/**
40-
* @member {boolean} SuperMap.ClipParameter.prototype.isClipInRegion
41-
* @description 是否对裁剪区内的数据集进行裁剪。
40+
* @member {boolean} [SuperMap.ClipParameter.prototype.isClipInRegion=true]
41+
* @description 是否对裁剪区内的数据集进行裁剪。若为 true,则对裁剪区域内的结果进行裁剪,若为 false,则对裁剪区域外的结果进行裁剪。
4242
*/
43-
this.isClipInRegion = false;
43+
this.isClipInRegion = true;
4444

4545
/**
4646
* @member {boolean} [SuperMap.ClipParameter.prototype.isExactClip=true]

src/common/iServer/CommonServiceBase.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
* @param {string} [options.proxy] - 服务代理地址。
3737
* @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务器类型,iServer|iPortal|Online。
3838
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
39-
* @param {SuperMap.DataFormat} [options.format=SuperMap.DataFormat.GEOJSON] - 查询结果返回格式,目前支持 iServerJSON 和 GeoJSON 两种格式。参数格式为 "ISERVER","GEOJSON"。
4039
*/
4140
export class CommonServiceBase {
4241

src/common/iServer/DataReturnOption.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {DataReturnMode} from '../REST';
77
* @category iServer SpatialAnalyst
88
* @classdesc 数据返回设置类。
99
* @param {Object} options - 参数。
10-
* @param {number} [options.expectCount=1000] - 设置返回的最大记录数,小于或者等于0时表示返回所有记录数
10+
* @param {number} [options.expectCount=1000] - 设置返回的最大记录数,小于或者等于 0 时表示返回所有记录数
1111
* @param {string} [options.dataset] - 设置结果数据集标识,当 dataReturnMode 为 {@link SuperMap.DataReturnMode.DATASET_ONLY}或{@link SuperMap.DataReturnMode.DATASET_AND_RECORDSET}时有效,
12-
* 作为返回数据集的名称。该名称用形如 "数据集名称@数据源别名" 形式来表示。
12+
* 作为返回数据集的名称。该名称用形如数据集名称@数据源别名形式来表示。
1313
* @param {SuperMap.DataReturnMode} [options.dataReturnMode=SuperMap.DataReturnMode.RECORDSET_ONLY] - 数据返回模式。
1414
* @param {boolean} [options.deleteExistResultDataset=true] - 如果用户命名的结果数据集名称与已有的数据集重名,是否删除已有的数据集。
1515
*/

0 commit comments

Comments
 (0)