@supermapgis/iclient-ol 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/control/ChangeTileVersion.js +438 -0
- package/control/Logo.js +97 -0
- package/control/ScaleLine.js +164 -0
- package/control/index.js +6 -0
- package/core/MapExtend.js +49 -0
- package/core/StyleUtils.js +1253 -0
- package/core/Util.js +500 -0
- package/core/index.js +6 -0
- package/css/ChangeTileVersion.css +347 -0
- package/css/index.js +5 -0
- package/dist/iclient-openlayers-es6.js +124963 -0
- package/dist/iclient-openlayers-es6.min.js +8 -0
- package/dist/iclient-openlayers.css +668 -0
- package/dist/iclient-openlayers.js +142946 -0
- package/dist/iclient-openlayers.min.css +8 -0
- package/dist/iclient-openlayers.min.js +8 -0
- package/index.js +9 -0
- package/mapping/BaiduMap.js +121 -0
- package/mapping/ImageSuperMapRest.js +252 -0
- package/mapping/ImageTileSuperMapRest.js +99 -0
- package/mapping/InitMap.js +150 -0
- package/mapping/SuperMapCloud.js +56 -0
- package/mapping/Tianditu.js +152 -0
- package/mapping/TileSuperMapRest.js +374 -0
- package/mapping/WebMap.js +5485 -0
- package/mapping/index.js +11 -0
- package/mapping/webmap/Util.js +176 -0
- package/mapping/webmap/config/MunicipalCenter.json +1 -0
- package/mapping/webmap/config/ProvinceCenter.json +1 -0
- package/mapping/webmap/config/SampleDataInfo.json +55 -0
- package/namespace.js +150 -0
- package/overlay/DataFlow.js +114 -0
- package/overlay/FGB.js +100 -0
- package/overlay/Graph.js +439 -0
- package/overlay/GraphMap.js +140 -0
- package/overlay/Graphic.js +588 -0
- package/overlay/HeatMap.js +450 -0
- package/overlay/Label.js +966 -0
- package/overlay/Mapv.js +149 -0
- package/overlay/Range.js +129 -0
- package/overlay/RankSymbol.js +94 -0
- package/overlay/Turf.js +299 -0
- package/overlay/Unique.js +124 -0
- package/overlay/VectorTileSuperMapRest.js +501 -0
- package/overlay/graphic/CanvasRenderer.js +177 -0
- package/overlay/graphic/CloverShape.js +133 -0
- package/overlay/graphic/Graphic.js +174 -0
- package/overlay/graphic/HitCloverShape.js +64 -0
- package/overlay/graphic/WebGLRenderer.js +356 -0
- package/overlay/graphic/index.js +9 -0
- package/overlay/index.js +21 -0
- package/overlay/mapv/MapvCanvasLayer.js +104 -0
- package/overlay/mapv/MapvLayer.js +413 -0
- package/overlay/mapv/index.js +5 -0
- package/overlay/theme/GeoFeature.js +275 -0
- package/overlay/theme/Theme.js +587 -0
- package/overlay/theme/ThemeFeature.js +46 -0
- package/overlay/theme/index.js +6 -0
- package/overlay/vectortile/DeafultCanvasStyle.js +125 -0
- package/overlay/vectortile/MapboxStyles.js +377 -0
- package/overlay/vectortile/StyleMap.js +252 -0
- package/overlay/vectortile/VectorTileStyles.js +554 -0
- package/overlay/vectortile/index.js +7 -0
- package/overlay/vectortile/olExtends.js +382 -0
- package/package.json +30 -0
- package/services/AddressMatchService.js +60 -0
- package/services/ChartService.js +97 -0
- package/services/DataFlowService.js +119 -0
- package/services/DatasetService.js +104 -0
- package/services/DatasourceService.js +76 -0
- package/services/FeatureService.js +260 -0
- package/services/FieldService.js +53 -0
- package/services/GeoprocessingService.js +157 -0
- package/services/GridCellInfosService.js +53 -0
- package/services/ImageCollectionService.js +93 -0
- package/services/ImageService.js +70 -0
- package/services/KnowledgeGraphService.js +96 -0
- package/services/LayerInfoService.js +85 -0
- package/services/MapService.js +85 -0
- package/services/MeasureService.js +77 -0
- package/services/NetworkAnalyst3DService.js +93 -0
- package/services/NetworkAnalystService.js +268 -0
- package/services/ProcessingService.js +507 -0
- package/services/QueryService.js +116 -0
- package/services/ServiceBase.js +26 -0
- package/services/SpatialAnalystService.js +466 -0
- package/services/ThemeService.js +50 -0
- package/services/TrafficTransferAnalystService.js +93 -0
- package/services/WebPrintingJobService.js +112 -0
- package/services/index.js +27 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { GeoprocessingService as CommonGeoprocessingService } from '@supermapgis/iclient-common/iServer/GeoprocessingService';
|
|
2
|
+
import { ServiceBase } from './ServiceBase';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @class GeoprocessingService
|
|
6
|
+
* @classdesc 处理自动化服务接口类。通过处理自动化工具构建处理自动化模型并运行,实现空间数据处理与分析过程的自动化。<br>
|
|
7
|
+
* 提供方法:获取处理自动化服务任务列表、某一任务的执行信息、异步执行状态信息;获取处理自动化工具的工具列表、某一工具的信息、异步执行的结果;异步、同步执行处理自动化工具;取消处理自动化任务的异步执行等。
|
|
8
|
+
* @modulecategory Services
|
|
9
|
+
* @version 10.1.0
|
|
10
|
+
* @category iServer ProcessingAutomationService
|
|
11
|
+
* @extends {ServiceBase}
|
|
12
|
+
* @example
|
|
13
|
+
* //为了安全访问受保护的处理自动化服务,必须通过传递iserver令牌(token),才能正确访问相关资源。
|
|
14
|
+
* SecurityManager.registerToken(serviceUrl, token);
|
|
15
|
+
* var geoprocessingService = new geoprocessingService("http://localhost:8090/iserver/services/geoprocessing/restjsr/gp/v2")
|
|
16
|
+
geoprocessingService.submitJob(identifier,params, environments, function(serverResult) {
|
|
17
|
+
console.log(serverResult.result);
|
|
18
|
+
var jobID = serverResult.result.jobID;
|
|
19
|
+
var options = {
|
|
20
|
+
interval: 5000,
|
|
21
|
+
statusCallback: function(state) {
|
|
22
|
+
console.log("Job Status: ", state);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
geoprocessingService.waitForJobCompletion(jobID, identifier, options, function(serverResult) {
|
|
26
|
+
console.log(serverResult);
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
* @param {string} url - 服务地址。
|
|
30
|
+
* @param {Object} options - 参数。
|
|
31
|
+
* @usage
|
|
32
|
+
*/
|
|
33
|
+
export class GeoprocessingService extends ServiceBase {
|
|
34
|
+
constructor(url, options) {
|
|
35
|
+
super(url, options);
|
|
36
|
+
this.headers = true;
|
|
37
|
+
this.crossOrigin = true;
|
|
38
|
+
this.withCredentials = true;
|
|
39
|
+
this.proxy = true;
|
|
40
|
+
this._geoprocessingJobsService = new CommonGeoprocessingService(this.url, {
|
|
41
|
+
proxy: this.options.proxy,
|
|
42
|
+
withCredentials: this.options.withCredentials,
|
|
43
|
+
crossOrigin: this.options.crossOrigin,
|
|
44
|
+
headers: this.options.headers
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @function GeoprocessingService.prototype.getTools
|
|
50
|
+
* @description 获取处理自动化工具列表。
|
|
51
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
52
|
+
* @returns {Promise} Promise 对象。
|
|
53
|
+
*/
|
|
54
|
+
getTools(callback) {
|
|
55
|
+
return this._geoprocessingJobsService.getTools(callback);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @function GeoprocessingService.prototype.getTool
|
|
60
|
+
* @description 获取处理自动化工具的 ID、名称、描述、输入参数、环境参数和输出结果等相关参数。
|
|
61
|
+
* @param {string} identifier - 处理自动化工具 ID。
|
|
62
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
63
|
+
* @returns {Promise} Promise 对象。
|
|
64
|
+
*/
|
|
65
|
+
getTool(identifier, callback) {
|
|
66
|
+
return this._geoprocessingJobsService.getTool(identifier, callback);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @function GeoprocessingService.prototype.execute
|
|
71
|
+
* @description 同步执行处理自动化工具。
|
|
72
|
+
* @param {string} identifier - 处理自动化工具 ID。
|
|
73
|
+
* @param {Object} parameter - 处理自动化工具的输入参数。
|
|
74
|
+
* @param {Object} environment - 处理自动化工具的环境参数。
|
|
75
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
76
|
+
* @returns {Promise} Promise 对象。
|
|
77
|
+
*/
|
|
78
|
+
execute(identifier, parameter, environment, callback) {
|
|
79
|
+
return this._geoprocessingJobsService.execute(identifier, parameter, environment, callback);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @function GeoprocessingService.prototype.submitJob
|
|
84
|
+
* @description 异步执行处理自动化工具。
|
|
85
|
+
* @param {string} identifier - 处理自动化工具 ID。
|
|
86
|
+
* @param {Object} parameter - 处理自动化工具的输入参数。
|
|
87
|
+
* @param {Object} environment - 处理自动化工具的环境参数。
|
|
88
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
89
|
+
* @returns {Promise} Promise 对象。
|
|
90
|
+
*/
|
|
91
|
+
submitJob(identifier, parameter, environment, callback) {
|
|
92
|
+
return this._geoprocessingJobsService.submitJob(identifier, parameter, environment, callback);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @function GeoprocessingService.prototype.waitForJobCompletion
|
|
97
|
+
* @description 获取处理自动化异步执行状态信息。
|
|
98
|
+
* @param {string} jobId - 处理自动化任务 ID。
|
|
99
|
+
* @param {string} identifier - 处理自动化工具 ID。
|
|
100
|
+
* @param {Object} options - 状态信息参数。
|
|
101
|
+
* @param {number} options.interval - 定时器时间间隔。
|
|
102
|
+
* @param {function} options.statusCallback - 回调函数。
|
|
103
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
104
|
+
* @returns {Promise} Promise 对象。
|
|
105
|
+
*/
|
|
106
|
+
waitForJobCompletion(jobId, identifier, options, callback) {
|
|
107
|
+
return this._geoprocessingJobsService.waitForJobCompletion(jobId, identifier, options, callback);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @function GeoprocessingService.prototype.getJobInfo
|
|
112
|
+
* @description 获取处理自动化任务的执行信息。
|
|
113
|
+
* @param {string} identifier - 处理自动化工具 ID。
|
|
114
|
+
* @param {string} jobId - 处理自动化任务 ID。
|
|
115
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
116
|
+
* @returns {Promise} Promise 对象。
|
|
117
|
+
*/
|
|
118
|
+
getJobInfo(identifier, jobId, callback) {
|
|
119
|
+
return this._geoprocessingJobsService.getJobInfo(identifier, jobId, callback);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @function GeoprocessingService.prototype.cancelJob
|
|
124
|
+
* @description 取消处理自动化任务的异步执行。
|
|
125
|
+
* @param {string} identifier - 处理自动化工具 ID。
|
|
126
|
+
* @param {string} jobId - 处理自动化任务 ID。
|
|
127
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
128
|
+
* @returns {Promise} Promise 对象。
|
|
129
|
+
*/
|
|
130
|
+
cancelJob(identifier, jobId, callback) {
|
|
131
|
+
return this._geoprocessingJobsService.cancelJob(identifier, jobId, callback);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @function GeoprocessingService.prototype.getJobs
|
|
136
|
+
* @description 获取处理自动化服务任务列表。
|
|
137
|
+
* @param {string} identifier - 处理自动化工具 ID。(可选,传参代表 identifier 算子的任务列表,不传参代表所有任务的列表)
|
|
138
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
139
|
+
* @returns {Promise} Promise 对象。
|
|
140
|
+
*/
|
|
141
|
+
getJobs(identifier, callback) {
|
|
142
|
+
return this._geoprocessingJobsService.getJobs(identifier, callback);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @function GeoprocessingService.prototype.getResults
|
|
147
|
+
* @description 处理自动化工具异步执行的结果,支持结果过滤。
|
|
148
|
+
* @param {string} identifier - 处理自动化工具 ID。
|
|
149
|
+
* @param {string} jobId - 处理自动化任务 ID。
|
|
150
|
+
* @param {string} filter - 输出异步结果的 ID。(可选,传入 filter 参数时对该处理自动化工具执行的结果进行过滤获取,不传参时显示所有的执行结果)
|
|
151
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
152
|
+
* @returns {Promise} Promise 对象。
|
|
153
|
+
*/
|
|
154
|
+
getResults(identifier, jobId, filter, callback) {
|
|
155
|
+
return this._geoprocessingJobsService.getResults(identifier, jobId, filter, callback);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* Copyright© 2000 - 2024 SuperMap Software Co.Ltd. All rights reserved.
|
|
2
|
+
* This program are made available under the terms of the Apache License, Version 2.0
|
|
3
|
+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
|
4
|
+
import {ServiceBase} from './ServiceBase';
|
|
5
|
+
import { GetGridCellInfosService } from '@supermapgis/iclient-common/iServer/GetGridCellInfosService';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
/**
|
|
9
|
+
* @class GridCellInfosService
|
|
10
|
+
* @category iServer Data Grid
|
|
11
|
+
* @classdesc 数据栅格查询服务类。此类用于设置查询某一地理位置所对应栅格单元信息的相关参数,包括:栅格值、栅格行、栅格列等。
|
|
12
|
+
* @modulecategory Services
|
|
13
|
+
* @extends {ServiceBase}
|
|
14
|
+
* @example
|
|
15
|
+
* new GridCellInfosService(url)
|
|
16
|
+
* .getGridCellInfos(param,function(result){
|
|
17
|
+
* //doSomething
|
|
18
|
+
* })
|
|
19
|
+
* @param {string} url - 服务地址。请求地图服务,URL 应为:
|
|
20
|
+
* http://{服务器地址}:{服务端口号}/iserver/services/{地图服务名}/rest/maps/{地图名}/tempLayersSet/{tempLayerID}/Rivers@World@@World。
|
|
21
|
+
* @param {Object} options - 参数。
|
|
22
|
+
* @param {string} [options.proxy] - 服务代理地址。
|
|
23
|
+
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
|
|
24
|
+
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
|
|
25
|
+
* @param {Object} [options.headers] - 请求头。
|
|
26
|
+
* @usage
|
|
27
|
+
*/
|
|
28
|
+
export class GridCellInfosService extends ServiceBase {
|
|
29
|
+
|
|
30
|
+
constructor(url, options) {
|
|
31
|
+
super(url, options);
|
|
32
|
+
this._gridCellQueryService = new GetGridCellInfosService(this.url, {
|
|
33
|
+
proxy: this.options.proxy,
|
|
34
|
+
withCredentials: this.options.withCredentials,
|
|
35
|
+
crossOrigin: this.options.crossOrigin,
|
|
36
|
+
headers: this.options.headers
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @function GridCellInfosService.prototype.getGridCellInfos
|
|
42
|
+
* @description 获取某一地理位置所对应的栅格单元信息。
|
|
43
|
+
* @param {GetGridCellInfosParameters} params - 数据服务栅格查询参数类。
|
|
44
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
45
|
+
* @returns {Promise} Promise 对象。
|
|
46
|
+
*/
|
|
47
|
+
getGridCellInfos(params, callback) {
|
|
48
|
+
if (!params) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return this._gridCellQueryService.processAsync(params, callback);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* Copyright© 2000 - 2024 SuperMap Software Co.Ltd. All rights reserved.
|
|
2
|
+
* This program are made available under the terms of the Apache License, Version 2.0
|
|
3
|
+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
|
4
|
+
import { ServiceBase } from './ServiceBase';
|
|
5
|
+
import CommonMatchImageCollectionService from '@supermapgis/iclient-common/iServer/ImageCollectionService';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ImageCollectionService
|
|
9
|
+
* @version 10.2.0
|
|
10
|
+
* @constructs ImageCollectionService
|
|
11
|
+
* @classdesc 影像集合服务类。提供方法:获取影像集合的统计信息、图例信息、服务瓦片信息,获取、删除影像集合中的指定影像等。
|
|
12
|
+
* @modulecategory Services
|
|
13
|
+
* @category iServer Image
|
|
14
|
+
* @extends {ServiceBase}
|
|
15
|
+
* @example
|
|
16
|
+
* new ImageCollectionService(url,options).getLegend(queryParams,function(result){
|
|
17
|
+
* //doSomething
|
|
18
|
+
* })
|
|
19
|
+
* @param {string} url - 服务地址。例如: http://{ip}:{port}/iserver/{imageservice-imageserviceName}/restjsr/
|
|
20
|
+
* @param {Object} options - 参数。
|
|
21
|
+
* @param {string} options.collectionId 影像集合(Collection)的 ID,在一个影像服务中唯一标识影像集合。
|
|
22
|
+
* @param {string} [options.proxy] - 服务代理地址。
|
|
23
|
+
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
|
|
24
|
+
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
|
|
25
|
+
* @param {Object} [options.headers] - 请求头。
|
|
26
|
+
* @usage
|
|
27
|
+
*/
|
|
28
|
+
export class ImageCollectionService extends ServiceBase {
|
|
29
|
+
constructor(url, options) {
|
|
30
|
+
super(url, options);
|
|
31
|
+
this._imageCollectionService = new CommonMatchImageCollectionService(this.url, {
|
|
32
|
+
collectionId: this.options.collectionId,
|
|
33
|
+
proxy: this.options.proxy,
|
|
34
|
+
withCredentials: this.options.withCredentials,
|
|
35
|
+
crossOrigin: this.options.crossOrigin,
|
|
36
|
+
headers: this.options.headers
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @function ImageCollectionService.prototype.getLegend
|
|
42
|
+
* @description 返回当前影像集合的图例信息。
|
|
43
|
+
* @param {Object} queryParams query 参数。
|
|
44
|
+
* @param {ImageRenderingRule} [queryParams.renderingRule] 指定影像显示的风格,包含拉伸显示方式、颜色表、波段组合以及应用栅格函数进行快速处理等。不指定时,使用发布服务时所配置的风格。
|
|
45
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
46
|
+
* @returns {Promise} Promise 对象。
|
|
47
|
+
*/
|
|
48
|
+
getLegend(queryParams, callback) {
|
|
49
|
+
return this._imageCollectionService.getLegend(queryParams, callback);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @function ImageCollectionService.prototype.getStatistics
|
|
54
|
+
* @description 返回当前影像集合的统计信息。包括文件数量,文件大小等信息。
|
|
55
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
56
|
+
* @returns {Promise} Promise 对象。
|
|
57
|
+
*/
|
|
58
|
+
getStatistics(callback) {
|
|
59
|
+
return this._imageCollectionService.getStatistics(callback);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @function ImageCollectionService.prototype.getTileInfo
|
|
64
|
+
* @description 返回影像集合所提供的服务瓦片的信息,包括:每层瓦片的分辨率,比例尺等信息,方便前端进行图层叠加。
|
|
65
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
66
|
+
* @returns {Promise} Promise 对象。
|
|
67
|
+
*/
|
|
68
|
+
getTileInfo(callback) {
|
|
69
|
+
return this._imageCollectionService.getTileInfo(callback);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @function ImageCollectionService.prototype.deleteItemByID
|
|
74
|
+
* @description 删除影像集合中的指定 ID(`featureId`)的 Item 对象,即从影像集合中删除指定的影像。
|
|
75
|
+
* @param {string} featureId Feature 的本地标识符。
|
|
76
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
77
|
+
* @returns {Promise} Promise 对象。
|
|
78
|
+
*/
|
|
79
|
+
deleteItemByID(featureId, callback) {
|
|
80
|
+
return this._imageCollectionService.deleteItemByID(featureId, callback);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @function ImageCollectionService.prototype.getItemByID
|
|
85
|
+
* @description 返回影像集合中的指定 ID(`featureId`)的 Item 对象,即返回影像集合中指定的影像。
|
|
86
|
+
* @param {string} featureId Feature 的本地标识符。
|
|
87
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
88
|
+
* @returns {Promise} Promise 对象。
|
|
89
|
+
*/
|
|
90
|
+
getItemByID(featureId, callback) {
|
|
91
|
+
return this._imageCollectionService.getItemByID(featureId, callback);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* Copyright© 2000 - 2024 SuperMap Software Co.Ltd. All rights reserved.
|
|
2
|
+
* This program are made available under the terms of the Apache License, Version 2.0
|
|
3
|
+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
|
4
|
+
import { ServiceBase } from './ServiceBase';
|
|
5
|
+
import CommonMatchImageService from '@supermapgis/iclient-common/iServer/ImageService';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ImageService
|
|
9
|
+
* @version 10.2.0
|
|
10
|
+
* @constructs ImageService
|
|
11
|
+
* @classdesc 影像服务类。可实现大规模影像或栅格数据的管理,提供方法:
|
|
12
|
+
* 获取影像集合列表、获取影像集合中指定 ID 的影像、根据过滤条件查询匹配的影像数据。
|
|
13
|
+
* @modulecategory Services
|
|
14
|
+
* @category iServer Image
|
|
15
|
+
* @extends {ServiceBase}
|
|
16
|
+
* @example
|
|
17
|
+
* ImageService(url,options).getCollections(function(result){
|
|
18
|
+
* //doSomething
|
|
19
|
+
* })
|
|
20
|
+
* @param {string} url - 服务地址。例如: http://{ip}:{port}/iserver/{imageservice-imageserviceName}/restjsr/
|
|
21
|
+
* @param {Object} options - 参数。
|
|
22
|
+
* @param {string} [options.proxy] - 服务代理地址。
|
|
23
|
+
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
|
|
24
|
+
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
|
|
25
|
+
* @param {Object} [options.headers] - 请求头。
|
|
26
|
+
* @usage
|
|
27
|
+
*/
|
|
28
|
+
export class ImageService extends ServiceBase {
|
|
29
|
+
constructor(url, options) {
|
|
30
|
+
super(url, options);
|
|
31
|
+
this._imageService = new CommonMatchImageService(this.url, {
|
|
32
|
+
proxy: this.options.proxy,
|
|
33
|
+
withCredentials: this.options.withCredentials,
|
|
34
|
+
crossOrigin: this.options.crossOrigin,
|
|
35
|
+
headers: this.options.headers
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @function ImageService.prototype.getCollections
|
|
41
|
+
* @description 返回当前影像服务中的影像集合列表(Collections)。
|
|
42
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
43
|
+
* @returns {Promise} Promise 对象。
|
|
44
|
+
*/
|
|
45
|
+
getCollections(callback) {
|
|
46
|
+
return this._imageService.getCollections(callback);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @function ImageService.prototype.getCollectionByID
|
|
51
|
+
* @description ID 值等于`collectionId`参数值的影像集合(Collection)。ID 值用于在服务中唯一标识该影像集合。
|
|
52
|
+
* @param {string} collectionId 影像集合(Collection)的 ID,在一个影像服务中唯一标识影像集合。
|
|
53
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
54
|
+
* @returns {Promise} Promise 对象。
|
|
55
|
+
*/
|
|
56
|
+
getCollectionByID(collectionId, callback) {
|
|
57
|
+
return this._imageService.getCollectionByID(collectionId, callback);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @function ImageService.prototype.search
|
|
62
|
+
* @description 查询与过滤条件匹配的影像数据。
|
|
63
|
+
* @param {ImageSearchParameter} [itemSearch] 查询参数。
|
|
64
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
65
|
+
* @returns {Promise} Promise 对象。
|
|
66
|
+
*/
|
|
67
|
+
search(itemSearch, callback) {
|
|
68
|
+
return this._imageService.search(itemSearch, callback);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* Copyright© 2000 - 2024 SuperMap Software Co.Ltd. All rights reserved.
|
|
2
|
+
* This program are made available under the terms of the Apache License, Version 2.0
|
|
3
|
+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
|
4
|
+
import { ServiceBase } from './ServiceBase';
|
|
5
|
+
import { KnowledgeGraphService as CommonKnowledgeGraphService } from '@supermapgis/iclient-common/iServer/KnowledgeGraphService';
|
|
6
|
+
/**
|
|
7
|
+
* @class KnowledgeGraphService
|
|
8
|
+
* @category iServer KnowledgeGraph
|
|
9
|
+
* @classdesc 知识图谱服务类。知识图谱是知识表示的一种形式,是由具有属性的实体通过关系链接而成的网状知识库。
|
|
10
|
+
* 图谱数据和常规结构化表格数据相比,具有强大的数据描述能力,可以实现更快更高效的查询,更快更精准的数据关联性推理运算和隐藏关系的挖掘。
|
|
11
|
+
* 提供方法:获取图谱图序列化数据、获取图谱列表、查询知识图谱数据、将 SuperMap iServer GraphMap 服务的数据格式转换为 KnowledgeGraph 的数据格式。
|
|
12
|
+
* @version 11.1.0
|
|
13
|
+
* @example
|
|
14
|
+
* new KnowledgeGraphService(url)
|
|
15
|
+
* .query(param,function(result){
|
|
16
|
+
* //doSomething
|
|
17
|
+
* })
|
|
18
|
+
* @extends {ServiceBase}
|
|
19
|
+
* @param {string} url - 服务地址。
|
|
20
|
+
* @param {Object} options -参数。
|
|
21
|
+
* @param {string} [options.proxy] - 服务代理地址。
|
|
22
|
+
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
|
|
23
|
+
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
|
|
24
|
+
* @param {Object} [options.headers] - 请求头。
|
|
25
|
+
* @usage
|
|
26
|
+
*/
|
|
27
|
+
export class KnowledgeGraphService extends ServiceBase {
|
|
28
|
+
constructor(url, options) {
|
|
29
|
+
super(url, options);
|
|
30
|
+
this._knowledgeGraphService = new CommonKnowledgeGraphService(url, options);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @function KnowledgeGraphService.prototype.findShortestPath
|
|
35
|
+
* @version 11.2.0
|
|
36
|
+
* @description 获取开始节点和结束节点之间的最短路径。
|
|
37
|
+
* @param {KnowledgeGraphService.findShortestPathParams} params - 参数。
|
|
38
|
+
* @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
39
|
+
* @returns {Promise} Promise 对象。
|
|
40
|
+
*/
|
|
41
|
+
findShortestPath(params, callback) {
|
|
42
|
+
return this._knowledgeGraphService.findShortestPath(params, callback);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @function KnowledgeGraphService.prototype.query
|
|
47
|
+
* @description 通过查询语句查询知识图谱数据。
|
|
48
|
+
* @param {string} cypherQuery - 查询条件。
|
|
49
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
50
|
+
* @returns {Promise} Promise 对象。
|
|
51
|
+
*/
|
|
52
|
+
query(cypherQuery, callback) {
|
|
53
|
+
return this._knowledgeGraphService.query(cypherQuery, callback);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// /**
|
|
57
|
+
// * @function KnowledgeGraphService.prototype.getMetaData
|
|
58
|
+
// * @description 获取元信息(展示所有实体类型和关系类型)。
|
|
59
|
+
// * @param {RequestCallback} callback 回调函数。
|
|
60
|
+
// */
|
|
61
|
+
// getMetaData(callback) {
|
|
62
|
+
// this._knowledgeGraphService.getMetaData(callback);
|
|
63
|
+
// }
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @function KnowledgeGraphService.prototype.getGraphMaps
|
|
67
|
+
* @description 获取图谱列表。
|
|
68
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
69
|
+
* @returns {Promise} Promise 对象。
|
|
70
|
+
*/
|
|
71
|
+
getGraphMaps(callback) {
|
|
72
|
+
return this._knowledgeGraphService.getGraphMaps(callback);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @function KnowledgeGraphService.prototype.getGraphMap
|
|
77
|
+
* @description 获取图谱图序列化数据。
|
|
78
|
+
* @param {string} params 图谱名称。
|
|
79
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
80
|
+
* @returns {Promise} Promise 对象。
|
|
81
|
+
*/
|
|
82
|
+
getGraphMap(params, callback) {
|
|
83
|
+
return this._knowledgeGraphService.getGraphMap(params, callback);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @function KnowledgeGraphService.prototype.getGraphMapData
|
|
88
|
+
* @description 将 SuperMap iServer GraphMap 服务的数据格式转换为 KnowledgeGraph 的数据格式。
|
|
89
|
+
* @param {string} graphMapName - 图谱名称。
|
|
90
|
+
* @returns {Promise} Promise 对象。
|
|
91
|
+
*/
|
|
92
|
+
async getGraphMapData(graphMapName) {
|
|
93
|
+
const res = await this._knowledgeGraphService.getGraphMapData(graphMapName);
|
|
94
|
+
return res;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* Copyright© 2000 - 2024 SuperMap Software Co.Ltd. All rights reserved.
|
|
2
|
+
* This program are made available under the terms of the Apache License, Version 2.0
|
|
3
|
+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
|
4
|
+
import {ServiceBase} from './ServiceBase';
|
|
5
|
+
import { LayerInfoService as CommonLayerInfoService } from '@supermapgis/iclient-common/iServer/LayerInfoService';
|
|
6
|
+
/**
|
|
7
|
+
* @class LayerInfoService
|
|
8
|
+
* @category iServer Map Layer
|
|
9
|
+
* @classdesc 图层信息服务类。
|
|
10
|
+
* @modulecategory Services
|
|
11
|
+
* @extends {ServiceBase}
|
|
12
|
+
* @example
|
|
13
|
+
* new LayerInfoService(url).getLayersInfo(function(result){
|
|
14
|
+
* //doSomething
|
|
15
|
+
* })
|
|
16
|
+
* @param {string} url - 服务地址。请求地图服务,URL 应为:
|
|
17
|
+
* http://{服务器地址}:{服务端口号}/iserver/services/{地图服务名}/rest/maps/{地图名}/tempLayersSet/{tempLayerID}/Rivers@World@@World"。
|
|
18
|
+
* @param {Object} options - 参数。
|
|
19
|
+
* @param {string} [options.proxy] - 服务代理地址。
|
|
20
|
+
* @param {boolean} [options.withCredentials=false] - 请求是否携带cookie。
|
|
21
|
+
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
|
|
22
|
+
* @param {Object} [options.headers] - 请求头。
|
|
23
|
+
* @usage
|
|
24
|
+
*/
|
|
25
|
+
export class LayerInfoService extends ServiceBase {
|
|
26
|
+
|
|
27
|
+
constructor(url, options) {
|
|
28
|
+
super(url, options);
|
|
29
|
+
this._layerInfoService = new CommonLayerInfoService(url, options);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @function LayerInfoService.prototype.getLayersInfo
|
|
34
|
+
* @description 获取图层信息服务。
|
|
35
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
36
|
+
* @returns {Promise} Promise 对象。
|
|
37
|
+
*/
|
|
38
|
+
getLayersInfo(callback) {
|
|
39
|
+
return this._layerInfoService.getLayersInfo(callback);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @function LayerInfoService.prototype.getLayersLegendInfo
|
|
44
|
+
* @description 获取地图的图例信息。
|
|
45
|
+
* @version 11.1.1
|
|
46
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
47
|
+
* @returns {Promise} Promise 对象。
|
|
48
|
+
*/
|
|
49
|
+
getLayersLegendInfo(params, callback) {
|
|
50
|
+
return this._layerInfoService.getLayersLegendInfo(params, callback);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @function LayerInfoService.prototype.setLayerInfo
|
|
55
|
+
* @description 设置图层信息服务。可以实现临时图层中子图层的修改。
|
|
56
|
+
* @param {SetLayerInfoParameters} params - 设置图层信息参数类。
|
|
57
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
58
|
+
* @returns {Promise} Promise 对象。
|
|
59
|
+
*/
|
|
60
|
+
setLayerInfo(params, callback) {
|
|
61
|
+
return this._layerInfoService.setLayerInfo(params, callback);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @function LayerInfoService.prototype.setLayersInfo
|
|
66
|
+
* @description 设置图层信息服务。可以创建新的临时图层和修改现有的临时图层。
|
|
67
|
+
* @param {SetLayersInfoParameters} params - 设置图层信息参数类。
|
|
68
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
69
|
+
* @returns {Promise} Promise 对象。
|
|
70
|
+
*/
|
|
71
|
+
setLayersInfo(params, callback) {
|
|
72
|
+
return this._layerInfoService.setLayersInfo(params, callback);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @function LayerInfoService.prototype.setLayerStatus
|
|
77
|
+
* @description 子图层显示控制服务。负责将子图层显示控制参数传递到服务端,并获取服务端返回的图层显示状态。
|
|
78
|
+
* @param {SetLayerStatusParameters} params - 子图层显示控制参数类。
|
|
79
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
80
|
+
* @returns {Promise} Promise 对象。
|
|
81
|
+
*/
|
|
82
|
+
setLayerStatus(params, callback) {
|
|
83
|
+
return this._layerInfoService.setLayerStatus(params, callback);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* Copyright© 2000 - 2024 SuperMap Software Co.Ltd. All rights reserved.
|
|
2
|
+
* This program are made available under the terms of the Apache License, Version 2.0
|
|
3
|
+
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
|
4
|
+
import { ServiceBase } from './ServiceBase';
|
|
5
|
+
import { Util } from '@supermapgis/iclient-common/commontypes/Util';
|
|
6
|
+
import { MapService as CommonMapService } from '@supermapgis/iclient-common/iServer/MapService';
|
|
7
|
+
import { TilesetsService } from '@supermapgis/iclient-common/iServer/TilesetsService';
|
|
8
|
+
/**
|
|
9
|
+
* @class MapService
|
|
10
|
+
* @category iServer Map
|
|
11
|
+
* @classdesc 地图信息服务类。通过该类可以获得地图的基本信息、投影信息、切片列表信息等等。
|
|
12
|
+
* @modulecategory Services
|
|
13
|
+
* @extends {ServiceBase}
|
|
14
|
+
* @param {string} url - 服务地址。
|
|
15
|
+
* @param {Object} options - 参数。
|
|
16
|
+
* @param {string} [options.proxy] - 服务代理地址。
|
|
17
|
+
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
|
|
18
|
+
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
|
|
19
|
+
* @param {Object} [options.headers] - 请求头。
|
|
20
|
+
* @example
|
|
21
|
+
* new MapService(url).getMapInfo(function(result){
|
|
22
|
+
* //doSomething
|
|
23
|
+
* })
|
|
24
|
+
* @usage
|
|
25
|
+
*/
|
|
26
|
+
export class MapService extends ServiceBase {
|
|
27
|
+
constructor(url, options) {
|
|
28
|
+
super(url, options);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @function MapService.prototype.getMapInfo
|
|
33
|
+
* @description 地图信息查询服务。
|
|
34
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
35
|
+
* @returns {Promise} Promise 对象。
|
|
36
|
+
*/
|
|
37
|
+
getMapInfo(callback) {
|
|
38
|
+
var me = this;
|
|
39
|
+
var getMapStatusService = new CommonMapService(me.url, {
|
|
40
|
+
proxy: me.options.proxy,
|
|
41
|
+
withCredentials: me.options.withCredentials,
|
|
42
|
+
crossOrigin: me.options.crossOrigin,
|
|
43
|
+
headers: me.options.headers,
|
|
44
|
+
projection: me.options.projection
|
|
45
|
+
});
|
|
46
|
+
return getMapStatusService.processAsync(callback);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @function MapService.prototype.getWKT
|
|
51
|
+
* @description 获取WKT。
|
|
52
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
53
|
+
* @returns {Promise} Promise 对象。
|
|
54
|
+
*/
|
|
55
|
+
getWKT(callback) {
|
|
56
|
+
var me = this;
|
|
57
|
+
var getMapStatusService = new CommonMapService(Util.urlPathAppend(me.url,'prjCoordSys.wkt'), {
|
|
58
|
+
proxy: me.options.proxy,
|
|
59
|
+
withCredentials: me.options.withCredentials,
|
|
60
|
+
withoutFormatSuffix: true,
|
|
61
|
+
crossOrigin: me.options.crossOrigin,
|
|
62
|
+
headers: me.options.headers,
|
|
63
|
+
projection: me.options.projection
|
|
64
|
+
});
|
|
65
|
+
return getMapStatusService.processAsync(callback);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @function MapService.prototype.getTilesets
|
|
70
|
+
* @description 切片列表信息查询服务。
|
|
71
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
72
|
+
* @returns {MapService} 获取服务信息。
|
|
73
|
+
* @returns {Promise} Promise 对象。
|
|
74
|
+
*/
|
|
75
|
+
getTilesets(callback) {
|
|
76
|
+
var me = this;
|
|
77
|
+
var tilesetsService = new TilesetsService(me.url, {
|
|
78
|
+
proxy: me.options.proxy,
|
|
79
|
+
withCredentials: me.options.withCredentials,
|
|
80
|
+
crossOrigin: me.options.crossOrigin,
|
|
81
|
+
headers: me.options.headers
|
|
82
|
+
});
|
|
83
|
+
return tilesetsService.processAsync(callback);
|
|
84
|
+
}
|
|
85
|
+
}
|