@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.
Files changed (91) hide show
  1. package/README.md +56 -0
  2. package/control/ChangeTileVersion.js +438 -0
  3. package/control/Logo.js +97 -0
  4. package/control/ScaleLine.js +164 -0
  5. package/control/index.js +6 -0
  6. package/core/MapExtend.js +49 -0
  7. package/core/StyleUtils.js +1253 -0
  8. package/core/Util.js +500 -0
  9. package/core/index.js +6 -0
  10. package/css/ChangeTileVersion.css +347 -0
  11. package/css/index.js +5 -0
  12. package/dist/iclient-openlayers-es6.js +124963 -0
  13. package/dist/iclient-openlayers-es6.min.js +8 -0
  14. package/dist/iclient-openlayers.css +668 -0
  15. package/dist/iclient-openlayers.js +142946 -0
  16. package/dist/iclient-openlayers.min.css +8 -0
  17. package/dist/iclient-openlayers.min.js +8 -0
  18. package/index.js +9 -0
  19. package/mapping/BaiduMap.js +121 -0
  20. package/mapping/ImageSuperMapRest.js +252 -0
  21. package/mapping/ImageTileSuperMapRest.js +99 -0
  22. package/mapping/InitMap.js +150 -0
  23. package/mapping/SuperMapCloud.js +56 -0
  24. package/mapping/Tianditu.js +152 -0
  25. package/mapping/TileSuperMapRest.js +374 -0
  26. package/mapping/WebMap.js +5485 -0
  27. package/mapping/index.js +11 -0
  28. package/mapping/webmap/Util.js +176 -0
  29. package/mapping/webmap/config/MunicipalCenter.json +1 -0
  30. package/mapping/webmap/config/ProvinceCenter.json +1 -0
  31. package/mapping/webmap/config/SampleDataInfo.json +55 -0
  32. package/namespace.js +150 -0
  33. package/overlay/DataFlow.js +114 -0
  34. package/overlay/FGB.js +100 -0
  35. package/overlay/Graph.js +439 -0
  36. package/overlay/GraphMap.js +140 -0
  37. package/overlay/Graphic.js +588 -0
  38. package/overlay/HeatMap.js +450 -0
  39. package/overlay/Label.js +966 -0
  40. package/overlay/Mapv.js +149 -0
  41. package/overlay/Range.js +129 -0
  42. package/overlay/RankSymbol.js +94 -0
  43. package/overlay/Turf.js +299 -0
  44. package/overlay/Unique.js +124 -0
  45. package/overlay/VectorTileSuperMapRest.js +501 -0
  46. package/overlay/graphic/CanvasRenderer.js +177 -0
  47. package/overlay/graphic/CloverShape.js +133 -0
  48. package/overlay/graphic/Graphic.js +174 -0
  49. package/overlay/graphic/HitCloverShape.js +64 -0
  50. package/overlay/graphic/WebGLRenderer.js +356 -0
  51. package/overlay/graphic/index.js +9 -0
  52. package/overlay/index.js +21 -0
  53. package/overlay/mapv/MapvCanvasLayer.js +104 -0
  54. package/overlay/mapv/MapvLayer.js +413 -0
  55. package/overlay/mapv/index.js +5 -0
  56. package/overlay/theme/GeoFeature.js +275 -0
  57. package/overlay/theme/Theme.js +587 -0
  58. package/overlay/theme/ThemeFeature.js +46 -0
  59. package/overlay/theme/index.js +6 -0
  60. package/overlay/vectortile/DeafultCanvasStyle.js +125 -0
  61. package/overlay/vectortile/MapboxStyles.js +377 -0
  62. package/overlay/vectortile/StyleMap.js +252 -0
  63. package/overlay/vectortile/VectorTileStyles.js +554 -0
  64. package/overlay/vectortile/index.js +7 -0
  65. package/overlay/vectortile/olExtends.js +382 -0
  66. package/package.json +30 -0
  67. package/services/AddressMatchService.js +60 -0
  68. package/services/ChartService.js +97 -0
  69. package/services/DataFlowService.js +119 -0
  70. package/services/DatasetService.js +104 -0
  71. package/services/DatasourceService.js +76 -0
  72. package/services/FeatureService.js +260 -0
  73. package/services/FieldService.js +53 -0
  74. package/services/GeoprocessingService.js +157 -0
  75. package/services/GridCellInfosService.js +53 -0
  76. package/services/ImageCollectionService.js +93 -0
  77. package/services/ImageService.js +70 -0
  78. package/services/KnowledgeGraphService.js +96 -0
  79. package/services/LayerInfoService.js +85 -0
  80. package/services/MapService.js +85 -0
  81. package/services/MeasureService.js +77 -0
  82. package/services/NetworkAnalyst3DService.js +93 -0
  83. package/services/NetworkAnalystService.js +268 -0
  84. package/services/ProcessingService.js +507 -0
  85. package/services/QueryService.js +116 -0
  86. package/services/ServiceBase.js +26 -0
  87. package/services/SpatialAnalystService.js +466 -0
  88. package/services/ThemeService.js +50 -0
  89. package/services/TrafficTransferAnalystService.js +93 -0
  90. package/services/WebPrintingJobService.js +112 -0
  91. 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';