@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,112 @@
|
|
|
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 { WebPrintingService } from '@supermapgis/iclient-common/iServer/WebPrintingService';
|
|
6
|
+
import { Point as GeometryPoint } from '@supermapgis/iclient-common/commontypes/geometry/Point';
|
|
7
|
+
import Point from 'ol/geom/Point';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @class WebPrintingJobService
|
|
11
|
+
* @category iServer WebPrintingJob
|
|
12
|
+
* @version 10.1.0
|
|
13
|
+
* @classdesc Web 打印服务类。Web 打印是指将 Web 应用中制作的 Web 内容输出为可打印的地图文档。<br>
|
|
14
|
+
* 提供方法:创建 Web 打印任务,获取 Web 打印任务内容,获取 Web 打印输出文档流,获取 Web 打印服务的布局模板信息等。
|
|
15
|
+
* @modulecategory Services
|
|
16
|
+
* @extends {ServiceBase}
|
|
17
|
+
* @param {string} url - 服务地址。请求打印地图服务的 URL 应为:http://{服务器地址}:{服务端口号}/iserver/services/webprinting/rest/webprinting/v1。
|
|
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
|
+
* @example
|
|
24
|
+
* new WebPrintingJobService(url).createWebPrintingJob(param,function(result){
|
|
25
|
+
* //doSomething
|
|
26
|
+
* })
|
|
27
|
+
* @usage
|
|
28
|
+
*/
|
|
29
|
+
export class WebPrintingJobService extends ServiceBase {
|
|
30
|
+
constructor(url, options) {
|
|
31
|
+
super(url, options);
|
|
32
|
+
this._webPrintingService = new WebPrintingService(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 WebPrintingJobService.prototype.createWebPrintingJob
|
|
42
|
+
* @description 创建 Web 打印任务。
|
|
43
|
+
* @param {WebPrintingJobParameters} params - Web 打印参数类。
|
|
44
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
45
|
+
* @returns {Promise} Promise 对象。
|
|
46
|
+
*/
|
|
47
|
+
createWebPrintingJob(params, callback) {
|
|
48
|
+
if (!params) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
return this._webPrintingService.createWebPrintingJob(this._processParams(params), callback);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @function WebPrintingJobService.prototype.getPrintingJob
|
|
56
|
+
* @description 获取 Web 打印输出文档任务。
|
|
57
|
+
* @param {string} jobId - Web 打印输入文档任务 ID。
|
|
58
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
59
|
+
* @returns {Promise} Promise 对象。
|
|
60
|
+
*/
|
|
61
|
+
getPrintingJob(jobId, callback) {
|
|
62
|
+
return this._webPrintingService.getPrintingJob(jobId, callback);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @function WebPrintingJobService.prototype.getPrintingJobResult
|
|
67
|
+
* @description 获取 Web 打印任务的输出文档。
|
|
68
|
+
* @param {string} jobId - Web 打印输入文档任务 ID。
|
|
69
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
70
|
+
* @returns {Promise} Promise 对象。
|
|
71
|
+
*/
|
|
72
|
+
getPrintingJobResult(jobId, callback) {
|
|
73
|
+
return this._webPrintingService.getPrintingJobResult(jobId, callback);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @function WebPrintingJobService.prototype.getLayoutTemplates
|
|
78
|
+
* @description 查询 Web 打印服务所有可用的模板信息。
|
|
79
|
+
* @param {RequestCallback} [callback] 回调函数,该参数未传时可通过返回的 promise 获取结果。
|
|
80
|
+
* @returns {Promise} Promise 对象。
|
|
81
|
+
*/
|
|
82
|
+
getLayoutTemplates(callback) {
|
|
83
|
+
return this._webPrintingService.getLayoutTemplates(callback);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
_processParams(params) {
|
|
87
|
+
if (params.layoutOptions && params.layoutOptions.littleMapOptions) {
|
|
88
|
+
params.layoutOptions.littleMapOptions.center = this._toPointObject(
|
|
89
|
+
params.layoutOptions.littleMapOptions.center
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (params.exportOptions) {
|
|
93
|
+
params.exportOptions.center = this._toPointObject(params.exportOptions.center);
|
|
94
|
+
}
|
|
95
|
+
return params;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
_toPointObject(point) {
|
|
99
|
+
if (Array.isArray(point)) {
|
|
100
|
+
return {
|
|
101
|
+
x: point[0],
|
|
102
|
+
y: point[1]
|
|
103
|
+
};
|
|
104
|
+
} else if (point instanceof GeometryPoint || point instanceof Point) {
|
|
105
|
+
return {
|
|
106
|
+
x: point.x,
|
|
107
|
+
y: point.y
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return point;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
export {AddressMatchService} from './AddressMatchService';
|
|
5
|
+
export {ChartService} from './ChartService';
|
|
6
|
+
export {DataFlowService} from './DataFlowService';
|
|
7
|
+
export {FeatureService} from './FeatureService';
|
|
8
|
+
export {FieldService} from './FieldService';
|
|
9
|
+
export {DatasetService} from './DatasetService';
|
|
10
|
+
export {DatasourceService} from './DatasourceService';
|
|
11
|
+
export {GridCellInfosService} from './GridCellInfosService';
|
|
12
|
+
export {GeoprocessingService} from './GeoprocessingService';
|
|
13
|
+
export {LayerInfoService} from './LayerInfoService';
|
|
14
|
+
export {MapService} from './MapService';
|
|
15
|
+
export {MeasureService} from './MeasureService';
|
|
16
|
+
export {NetworkAnalyst3DService} from './NetworkAnalyst3DService';
|
|
17
|
+
export {NetworkAnalystService} from './NetworkAnalystService';
|
|
18
|
+
export {ProcessingService} from './ProcessingService';
|
|
19
|
+
export {QueryService} from './QueryService';
|
|
20
|
+
export {ServiceBase} from './ServiceBase';
|
|
21
|
+
export {SpatialAnalystService} from './SpatialAnalystService';
|
|
22
|
+
export {ThemeService} from './ThemeService';
|
|
23
|
+
export {TrafficTransferAnalystService} from './TrafficTransferAnalystService';
|
|
24
|
+
export {WebPrintingJobService} from './WebPrintingJobService';
|
|
25
|
+
export { ImageService } from './ImageService';
|
|
26
|
+
export { ImageCollectionService } from './ImageCollectionService';
|
|
27
|
+
export { KnowledgeGraphService } from './KnowledgeGraphService';
|