@vtx/cs-map 1.0.27 → 1.0.29

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 (229) hide show
  1. package/README.md +202 -202
  2. package/lib/_util/EventEmitter.js +1 -2
  3. package/lib/_util/EventEmitter.js.map +1 -1
  4. package/lib/_util/Provider.js +2 -4
  5. package/lib/_util/Provider.js.map +1 -1
  6. package/lib/_util/filterSpecialCharacters.js +6 -6
  7. package/lib/_util/filterSpecialCharacters.js.map +1 -1
  8. package/lib/_util/generateRandomPosition.js +6 -7
  9. package/lib/_util/generateRandomPosition.js.map +1 -1
  10. package/lib/_util/getComponentProps.js.map +1 -1
  11. package/lib/_util/getCookie.js +5 -6
  12. package/lib/_util/getCookie.js.map +1 -1
  13. package/lib/_util/getDefaultMapInfo.js +1 -2
  14. package/lib/_util/getDefaultMapInfo.js.map +1 -1
  15. package/lib/_util/getSystemInfo.js +1 -2
  16. package/lib/_util/getSystemInfo.js.map +1 -1
  17. package/lib/_util/getToken.js +1 -2
  18. package/lib/_util/getToken.js.map +1 -1
  19. package/lib/_util/getUrlParam.js +1 -2
  20. package/lib/_util/getUrlParam.js.map +1 -1
  21. package/lib/_util/http.js +19 -20
  22. package/lib/_util/http.js.map +1 -1
  23. package/lib/_util/isFunction.js.map +1 -1
  24. package/lib/_util/isObject.js.map +1 -1
  25. package/lib/_util/layer.js +24 -28
  26. package/lib/_util/layer.js.map +1 -1
  27. package/lib/_util/mapTool.js +35 -36
  28. package/lib/_util/mapTool.js.map +1 -1
  29. package/lib/_util/setCookie.js +5 -6
  30. package/lib/_util/setCookie.js.map +1 -1
  31. package/lib/_util/transformRgb.js +1 -2
  32. package/lib/_util/transformRgb.js.map +1 -1
  33. package/lib/_util/useColSize.js +1 -2
  34. package/lib/_util/useColSize.js.map +1 -1
  35. package/lib/_util/useInterval.js.map +1 -1
  36. package/lib/_util/useProps.js +1 -2
  37. package/lib/_util/useProps.js.map +1 -1
  38. package/lib/_util/useSet.js +1 -2
  39. package/lib/_util/useSet.js.map +1 -1
  40. package/lib/cesium-tiles-layer/CesiumTilesLayer.js +3 -4
  41. package/lib/cesium-tiles-layer/CesiumTilesLayer.js.map +1 -1
  42. package/lib/cesium-tiles-layer/index.js +6 -2
  43. package/lib/cesium-tiles-layer/index.js.map +1 -1
  44. package/lib/cesium-tiles-layer/style/css.js.map +1 -1
  45. package/lib/cesium-tiles-layer/style/index.js.map +1 -1
  46. package/lib/config.js +1 -2
  47. package/lib/config.js.map +1 -1
  48. package/lib/events/index.js +2 -4
  49. package/lib/events/index.js.map +1 -1
  50. package/lib/feature-layer/FeatureLayer.js +1 -2
  51. package/lib/feature-layer/FeatureLayer.js.map +1 -1
  52. package/lib/feature-layer/createFeatureCollection.js +17 -23
  53. package/lib/feature-layer/createFeatureCollection.js.map +1 -1
  54. package/lib/feature-layer/index.js.map +1 -1
  55. package/lib/feature-layer/style/css.js.map +1 -1
  56. package/lib/feature-layer/style/index.js.map +1 -1
  57. package/lib/fly-line-layer/FlyLineLayer.js +57 -10
  58. package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
  59. package/lib/fly-line-layer/index.js +9 -2
  60. package/lib/fly-line-layer/index.js.map +1 -1
  61. package/lib/fly-line-layer/lineFlowMaterialProperty.js +1 -2
  62. package/lib/fly-line-layer/lineFlowMaterialProperty.js.map +1 -1
  63. package/lib/fly-line-layer/style/css.js.map +1 -1
  64. package/lib/fly-line-layer/style/index.js.map +1 -1
  65. package/lib/gif-dom-layer/GifDomLayer.js +1 -2
  66. package/lib/gif-dom-layer/GifDomLayer.js.map +1 -1
  67. package/lib/gif-dom-layer/index.js.map +1 -1
  68. package/lib/gif-dom-layer/style/css.js.map +1 -1
  69. package/lib/gif-dom-layer/style/index.js.map +1 -1
  70. package/lib/gradation-line-layer/GradationLineLayer.js +1 -2
  71. package/lib/gradation-line-layer/GradationLineLayer.js.map +1 -1
  72. package/lib/gradation-line-layer/index.js.map +1 -1
  73. package/lib/gradation-line-layer/style/css.js.map +1 -1
  74. package/lib/gradation-line-layer/style/index.js.map +1 -1
  75. package/lib/group-layer/GroupLayer.js +1 -2
  76. package/lib/group-layer/GroupLayer.js.map +1 -1
  77. package/lib/group-layer/index.js.map +1 -1
  78. package/lib/group-layer/style/css.js.map +1 -1
  79. package/lib/group-layer/style/index.js.map +1 -1
  80. package/lib/heatmap-layer/CesiumHeatmap.js +86 -32
  81. package/lib/heatmap-layer/CesiumHeatmap.js.map +1 -1
  82. package/lib/heatmap-layer/HeatmapLayer.js +1 -2
  83. package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
  84. package/lib/heatmap-layer/heatmap.js +42 -43
  85. package/lib/heatmap-layer/heatmap.js.map +1 -1
  86. package/lib/heatmap-layer/index.js +24 -2
  87. package/lib/heatmap-layer/index.js.map +1 -1
  88. package/lib/highlight-layer/HighlightLayer.js +31 -18
  89. package/lib/highlight-layer/HighlightLayer.js.map +1 -1
  90. package/lib/highlight-layer/index.js.map +1 -1
  91. package/lib/highlight-layer/style/css.js.map +1 -1
  92. package/lib/highlight-layer/style/index.js.map +1 -1
  93. package/lib/image-layer/ImageLayer.js +2 -4
  94. package/lib/image-layer/ImageLayer.js.map +1 -1
  95. package/lib/image-layer/index.js.map +1 -1
  96. package/lib/index.js.map +1 -1
  97. package/lib/legend/index.js +1 -2
  98. package/lib/legend/index.js.map +1 -1
  99. package/lib/legend/style/css.js.map +1 -1
  100. package/lib/legend/style/index.js.map +1 -1
  101. package/lib/legend/style/index.less +63 -63
  102. package/lib/line-flow-layer/LineFlowLayer.js +1 -2
  103. package/lib/line-flow-layer/LineFlowLayer.js.map +1 -1
  104. package/lib/line-flow-layer/style/css.js.map +1 -1
  105. package/lib/line-flow-layer/style/index.js.map +1 -1
  106. package/lib/map/InfoTool/index.js +44 -45
  107. package/lib/map/InfoTool/index.js.map +1 -1
  108. package/lib/map/InfoTool/index.less +46 -46
  109. package/lib/map/InfoTool/util.js +24 -25
  110. package/lib/map/InfoTool/util.js.map +1 -1
  111. package/lib/map/InfoWindow.js.map +1 -1
  112. package/lib/map/Layers.js +9 -8
  113. package/lib/map/Layers.js.map +1 -1
  114. package/lib/map/Popup.js +4 -6
  115. package/lib/map/Popup.js.map +1 -1
  116. package/lib/map/base/imagery/amap/AmapImageryProvider.js +1 -2
  117. package/lib/map/base/imagery/amap/AmapImageryProvider.js.map +1 -1
  118. package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js +1 -2
  119. package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js.map +1 -1
  120. package/lib/map/base/imagery/baidu/BaiduImageryProvider.js +1 -2
  121. package/lib/map/base/imagery/baidu/BaiduImageryProvider.js.map +1 -1
  122. package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js +78 -79
  123. package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js.map +1 -1
  124. package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js +14 -15
  125. package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js.map +1 -1
  126. package/lib/map/base/imagery/geoq/GeoQImageryProvider.js +1 -2
  127. package/lib/map/base/imagery/geoq/GeoQImageryProvider.js.map +1 -1
  128. package/lib/map/base/imagery/google/GoogleImageryProvider.js +1 -2
  129. package/lib/map/base/imagery/google/GoogleImageryProvider.js.map +1 -1
  130. package/lib/map/base/imagery/tdt/TdtImageryProvider.js +1 -2
  131. package/lib/map/base/imagery/tdt/TdtImageryProvider.js.map +1 -1
  132. package/lib/map/base/imagery/tencent/TencentImageryProvider.js +1 -2
  133. package/lib/map/base/imagery/tencent/TencentImageryProvider.js.map +1 -1
  134. package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js +1 -2
  135. package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js.map +1 -1
  136. package/lib/map/base/imagery/transform/CoordTransform.js +43 -44
  137. package/lib/map/base/imagery/transform/CoordTransform.js.map +1 -1
  138. package/lib/map/base/index.js +3 -6
  139. package/lib/map/base/index.js.map +1 -1
  140. package/lib/map/hooks/useGetMapFeatureInfoByText.js +2 -4
  141. package/lib/map/hooks/useGetMapFeatureInfoByText.js.map +1 -1
  142. package/lib/map/index.js +9 -4
  143. package/lib/map/index.js.map +1 -1
  144. package/lib/map/material/AroundPoint.js +1 -2
  145. package/lib/map/material/AroundPoint.js.map +1 -1
  146. package/lib/map/material/CircleRippleMaterialProperty.js +6 -7
  147. package/lib/map/material/CircleRippleMaterialProperty.js.map +1 -1
  148. package/lib/map/material/ODLineLayer.js +1 -2
  149. package/lib/map/material/ODLineLayer.js.map +1 -1
  150. package/lib/map/material/PolylineTrailLinkMaterialProperty.js +1 -2
  151. package/lib/map/material/PolylineTrailLinkMaterialProperty.js.map +1 -1
  152. package/lib/map/material/PolylineTrailMaterialProperty.js +1 -2
  153. package/lib/map/material/PolylineTrailMaterialProperty.js.map +1 -1
  154. package/lib/map/material/TilesBuilding.js +1 -2
  155. package/lib/map/material/TilesBuilding.js.map +1 -1
  156. package/lib/map/material/index.js +1 -2
  157. package/lib/map/material/index.js.map +1 -1
  158. package/lib/map/style/css.js.map +1 -1
  159. package/lib/map/style/index.js.map +1 -1
  160. package/lib/map/style/index.less +149 -149
  161. package/lib/marker/Marker.js +1 -2
  162. package/lib/marker/Marker.js.map +1 -1
  163. package/lib/marker/index.js.map +1 -1
  164. package/lib/point/Point.js +1 -2
  165. package/lib/point/Point.js.map +1 -1
  166. package/lib/point/index.js.map +1 -1
  167. package/lib/polygon/Polygon.js +1 -2
  168. package/lib/polygon/Polygon.js.map +1 -1
  169. package/lib/polygon/index.js.map +1 -1
  170. package/lib/polyline/Polyline.js +3 -3
  171. package/lib/polyline/Polyline.js.map +1 -1
  172. package/lib/polyline/index.js.map +1 -1
  173. package/lib/renderer/index.js +12 -24
  174. package/lib/renderer/index.js.map +1 -1
  175. package/lib/renderer/style/css.js.map +1 -1
  176. package/lib/renderer/style/index.js.map +1 -1
  177. package/lib/style/index.less +2 -2
  178. package/lib/style/themes/compact.less +1 -1
  179. package/lib/style/themes/dark.less +9 -9
  180. package/lib/style/themes/default.less +7 -7
  181. package/lib/style/themes/index.less +1 -1
  182. package/lib/style/themes/variable.less +5 -5
  183. package/lib/tools/base-map-switch/index.js.map +1 -1
  184. package/lib/tools/dimension-switch/index.js.map +1 -1
  185. package/lib/tools/index.js +2 -3
  186. package/lib/tools/index.js.map +1 -1
  187. package/lib/tools/layer-control/index.js +8 -9
  188. package/lib/tools/layer-control/index.js.map +1 -1
  189. package/lib/tools/map-search/Select/index.js +6 -7
  190. package/lib/tools/map-search/Select/index.js.map +1 -1
  191. package/lib/tools/map-search/Select/style/css.js.map +1 -1
  192. package/lib/tools/map-search/Select/style/index.js.map +1 -1
  193. package/lib/tools/map-search/Select/style/index.less +47 -47
  194. package/lib/tools/map-search/index.js +3 -3
  195. package/lib/tools/map-search/index.js.map +1 -1
  196. package/lib/tools/style/css.js.map +1 -1
  197. package/lib/tools/style/index.js.map +1 -1
  198. package/lib/tools/style/index.less +213 -213
  199. package/lib/tools/tools-item/index.js +1 -2
  200. package/lib/tools/tools-item/index.js.map +1 -1
  201. package/lib/trail-polyline-layer/TrailPolylineLayer.js +1 -2
  202. package/lib/trail-polyline-layer/TrailPolylineLayer.js.map +1 -1
  203. package/lib/trail-polyline-layer/TrailPolylineMaterial.js +1 -2
  204. package/lib/trail-polyline-layer/TrailPolylineMaterial.js.map +1 -1
  205. package/lib/trail-polyline-layer/style/css.js.map +1 -1
  206. package/lib/trail-polyline-layer/style/index.js.map +1 -1
  207. package/lib/water-surface-layer/WaterSurfaceLayer.js +1 -2
  208. package/lib/water-surface-layer/WaterSurfaceLayer.js.map +1 -1
  209. package/lib/water-surface-layer/index.js.map +1 -1
  210. package/lib/water-surface-layer/style/css.js.map +1 -1
  211. package/lib/water-surface-layer/style/index.js.map +1 -1
  212. package/lib/weather/Weather.js +29 -30
  213. package/lib/weather/Weather.js.map +1 -1
  214. package/lib/weather/index.js +1 -2
  215. package/lib/weather/index.js.map +1 -1
  216. package/lib/weather/style/css.js.map +1 -1
  217. package/lib/weather/style/index.js.map +1 -1
  218. package/lib/weather/style/index.less +63 -63
  219. package/package.json +122 -123
  220. package/lib/demand-layer/DemandLayer.js +0 -410
  221. package/lib/demand-layer/DemandLayer.js.map +0 -1
  222. package/lib/demand-layer/index.js +0 -104
  223. package/lib/demand-layer/index.js.map +0 -1
  224. package/lib/demand-layer/style/css.js +0 -4
  225. package/lib/demand-layer/style/css.js.map +0 -1
  226. package/lib/demand-layer/style/index.css +0 -0
  227. package/lib/demand-layer/style/index.js +0 -4
  228. package/lib/demand-layer/style/index.js.map +0 -1
  229. package/lib/demand-layer/style/index.less +0 -0
package/package.json CHANGED
@@ -1,123 +1,122 @@
1
- {
2
- "name": "@vtx/cs-map",
3
- "version": "1.0.27",
4
- "description": "React components for Vortex",
5
- "keywords": [
6
- "react",
7
- "react-component"
8
- ],
9
- "files": [
10
- "lib"
11
- ],
12
- "main": "lib/index.js",
13
- "scripts": {
14
- "start": "dumi dev",
15
- "build": "dumi build",
16
- "compile": "gulp compile",
17
- "lint": "npm run lint:script && npm run lint:style",
18
- "lint:script": "eslint components --ext .js,.jsx",
19
- "lint:style": "stylelint components/**/*.less --syntax less",
20
- "fix": "eslint --fix --ext .js,.jsx components && npm run style:fix",
21
- "style:fix": "stylelint components/**/*.less --syntax less --fix",
22
- "prettier": "prettier -c --write **/*",
23
- "pretty-quick": "pretty-quick",
24
- "pub": "npm publish --access=public",
25
- "bump": "gulp bump --prerelease",
26
- "release": "release-it --no-npm.publish",
27
- "version": "npm run changelog && git add CHANGELOG.md",
28
- "changelog": "conventional-changelog -p custom-config -i CHANGELOG.md -s -r 0"
29
- },
30
- "repository": {
31
- "type": "git",
32
- "url": "https://git.cloudhw.cn:3443/front-end/maps/cs-map.git"
33
- },
34
- "license": "ISC",
35
- "bugs": {
36
- "url": "https://git.cloudhw.cn:3443/front-end/maps/cs-map/-/issues"
37
- },
38
- "homepage": "https://git.cloudhw.cn:3443/front-end/maps/cs-map.git",
39
- "husky": {
40
- "hooks": {
41
- "pre-commit": "npm run lint",
42
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
43
- }
44
- },
45
- "release-it": {
46
- "git": {
47
- "commitMessage": "chore: release v${version}"
48
- }
49
- },
50
- "changelog": {
51
- "emojis": true,
52
- "authorName": true
53
- },
54
- "dependencies": {
55
- "@ant-design/icons": "4.7.0",
56
- "@turf/turf": "^6.5.0",
57
- "@vtx/map-icon": "latest",
58
- "@vtx/utils": "latest",
59
- "ahooks": "^3.1.5",
60
- "antd": "4.20.5",
61
- "axios": "^0.21.1",
62
- "cesium": "1.90.0",
63
- "classnames": "^2.2.6",
64
- "heatmap.js": "^2.0.5",
65
- "html2canvas": "^1.4.1",
66
- "libgif": "^0.0.3",
67
- "lodash": "^4.17.21",
68
- "moment": "^2.29.1",
69
- "ol": "6.15.1",
70
- "print-js": "^1.6.0",
71
- "prop-types": "^15.8.1",
72
- "rc-color-picker": "^1.2.6",
73
- "react-color": "^2.19.3"
74
- },
75
- "peerDependencies": {
76
- "react": ">=16.12.0",
77
- "react-dom": ">=16.12.0"
78
- },
79
- "devDependencies": {
80
- "@babel/cli": "^7.6.4",
81
- "@babel/core": "^7.6.4",
82
- "@babel/plugin-proposal-class-properties": "^7.5.5",
83
- "@babel/plugin-transform-runtime": "^7.6.2",
84
- "@babel/preset-env": "^7.6.3",
85
- "@babel/preset-react": "^7.6.3",
86
- "@babel/runtime": "^7.6.3",
87
- "@commitlint/cli": "^8.3.4",
88
- "@commitlint/config-conventional": "^8.3.4",
89
- "@umijs/plugin-locale": "^0.10.8",
90
- "babel-eslint": "^10.1.0",
91
- "babel-plugin-import": "^1.13.3",
92
- "conventional-changelog-cli": "^2.1.1",
93
- "conventional-changelog-custom-config": "^0.3.1",
94
- "dumi": "^1.0.10",
95
- "eslint": "^6.6.0",
96
- "eslint-plugin-react": "^7.21.5",
97
- "eslint-plugin-react-hooks": "^4.2.0",
98
- "gulp": "^4.0.2",
99
- "gulp-babel": "^8.0.0",
100
- "gulp-bump": "^3.1.3",
101
- "gulp-clean": "^0.4.0",
102
- "gulp-imagemin": "^7.1.0",
103
- "gulp-less": "5.0.0",
104
- "gulp-sourcemaps": "^2.6.5",
105
- "husky": "^4.0.7",
106
- "jquery": "^3.6.0",
107
- "less": "^3.10.3",
108
- "less-plugin-autoprefix": "^2.0.0",
109
- "less-plugin-npm-import": "^2.1.0",
110
- "merge2": "^1.3.0",
111
- "prettier": "^1.18.2",
112
- "pretty-quick": "^2.0.0",
113
- "release-it": "^14.6.1",
114
- "rimraf": "^3.0.0",
115
- "stylelint": "11.0.0",
116
- "stylelint-config-prettier": "^6.0.0",
117
- "stylelint-config-rational-order": "^0.1.2",
118
- "stylelint-config-standard": "^19.0.0",
119
- "stylelint-declaration-block-no-ignored-properties": "^2.1.0",
120
- "stylelint-order": "^3.0.0",
121
- "through2": "^3.0.1"
122
- }
123
- }
1
+ {
2
+ "name": "@vtx/cs-map",
3
+ "version": "1.0.29",
4
+ "description": "React components for Vortex",
5
+ "keywords": [
6
+ "react",
7
+ "react-component"
8
+ ],
9
+ "files": [
10
+ "lib"
11
+ ],
12
+ "main": "lib/index.js",
13
+ "scripts": {
14
+ "start": "dumi dev",
15
+ "build": "dumi build",
16
+ "compile": "gulp compile",
17
+ "lint": "npm run lint:script && npm run lint:style",
18
+ "lint:script": "eslint components --ext .js,.jsx",
19
+ "lint:style": "stylelint components/**/*.less --syntax less",
20
+ "fix": "eslint --fix --ext .js,.jsx components && npm run style:fix",
21
+ "style:fix": "stylelint components/**/*.less --syntax less --fix",
22
+ "prettier": "prettier -c --write **/*",
23
+ "pretty-quick": "pretty-quick",
24
+ "pub": "npm publish --access=public",
25
+ "bump": "gulp bump --prerelease",
26
+ "release": "release-it --no-npm.publish",
27
+ "version": "npm run changelog && git add CHANGELOG.md",
28
+ "changelog": "conventional-changelog -p custom-config -i CHANGELOG.md -s -r 0"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://git.cloudhw.cn:3443/front-end/maps/cs-map.git"
33
+ },
34
+ "license": "ISC",
35
+ "bugs": {
36
+ "url": "https://git.cloudhw.cn:3443/front-end/maps/cs-map/-/issues"
37
+ },
38
+ "homepage": "https://git.cloudhw.cn:3443/front-end/maps/cs-map.git",
39
+ "husky": {
40
+ "hooks": {
41
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
42
+ }
43
+ },
44
+ "release-it": {
45
+ "git": {
46
+ "commitMessage": "chore: release v${version}"
47
+ }
48
+ },
49
+ "changelog": {
50
+ "emojis": true,
51
+ "authorName": true
52
+ },
53
+ "dependencies": {
54
+ "@ant-design/icons": "4.7.0",
55
+ "@turf/turf": "^6.5.0",
56
+ "@vtx/map-icon": "latest",
57
+ "@vtx/utils": "latest",
58
+ "ahooks": "^3.1.5",
59
+ "antd": "4.20.5",
60
+ "axios": "^0.21.1",
61
+ "cesium": "1.90.0",
62
+ "classnames": "^2.2.6",
63
+ "heatmap.js": "^2.0.5",
64
+ "html2canvas": "^1.4.1",
65
+ "libgif": "^0.0.3",
66
+ "lodash": "^4.17.21",
67
+ "moment": "^2.29.1",
68
+ "ol": "6.15.1",
69
+ "print-js": "^1.6.0",
70
+ "prop-types": "^15.8.1",
71
+ "rc-color-picker": "^1.2.6",
72
+ "react-color": "^2.19.3"
73
+ },
74
+ "peerDependencies": {
75
+ "react": ">=16.12.0",
76
+ "react-dom": ">=16.12.0"
77
+ },
78
+ "devDependencies": {
79
+ "@babel/cli": "^7.6.4",
80
+ "@babel/core": "^7.6.4",
81
+ "@babel/plugin-proposal-class-properties": "^7.5.5",
82
+ "@babel/plugin-transform-runtime": "^7.6.2",
83
+ "@babel/preset-env": "^7.6.3",
84
+ "@babel/preset-react": "^7.6.3",
85
+ "@babel/runtime": "^7.6.3",
86
+ "@commitlint/cli": "^8.3.4",
87
+ "@commitlint/config-conventional": "^8.3.4",
88
+ "@umijs/plugin-locale": "^0.10.8",
89
+ "babel-eslint": "^10.1.0",
90
+ "babel-plugin-import": "^1.13.3",
91
+ "conventional-changelog-cli": "^2.1.1",
92
+ "conventional-changelog-custom-config": "^0.3.1",
93
+ "dumi": "^1.0.10",
94
+ "eslint": "^6.6.0",
95
+ "eslint-plugin-react": "^7.21.5",
96
+ "eslint-plugin-react-hooks": "^4.2.0",
97
+ "gulp": "^4.0.2",
98
+ "gulp-babel": "^8.0.0",
99
+ "gulp-bump": "^3.1.3",
100
+ "gulp-clean": "^0.4.0",
101
+ "gulp-imagemin": "^7.1.0",
102
+ "gulp-less": "5.0.0",
103
+ "gulp-sourcemaps": "^2.6.5",
104
+ "husky": "^4.0.7",
105
+ "jquery": "^3.6.0",
106
+ "less": "^3.10.3",
107
+ "less-plugin-autoprefix": "^2.0.0",
108
+ "less-plugin-npm-import": "^2.1.0",
109
+ "merge2": "^1.3.0",
110
+ "prettier": "^1.18.2",
111
+ "pretty-quick": "^2.0.0",
112
+ "release-it": "^14.6.1",
113
+ "rimraf": "^3.0.0",
114
+ "stylelint": "11.0.0",
115
+ "stylelint-config-prettier": "^6.0.0",
116
+ "stylelint-config-rational-order": "^0.1.2",
117
+ "stylelint-config-standard": "^19.0.0",
118
+ "stylelint-declaration-block-no-ignored-properties": "^2.1.0",
119
+ "stylelint-order": "^3.0.0",
120
+ "through2": "^3.0.1"
121
+ }
122
+ }
@@ -1,410 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _cesium = require("cesium");
9
- var _CockpitIcon = _interopRequireDefault(require("@vtx/map-icon/lib/map-icon/CockpitIcon"));
10
- var _FeatureLayer2 = _interopRequireDefault(require("../feature-layer/FeatureLayer"));
11
- var _createFeatureCollection = require("../feature-layer/createFeatureCollection");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
17
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
18
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
19
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
20
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
21
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
23
- function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
24
- function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new TypeError('failed to set property'); } return value; }
25
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
28
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
29
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
30
- var DemandLayer = /*#__PURE__*/function (_FeatureLayer) {
31
- _inherits(DemandLayer, _FeatureLayer);
32
- var _super = _createSuper(DemandLayer);
33
- function DemandLayer(opt_options) {
34
- var _thisSuper, _this2;
35
- _classCallCheck(this, DemandLayer);
36
- var options = opt_options || {};
37
- var url = options.url,
38
- params = options.params,
39
- data = options.data,
40
- key = options.key,
41
- name = options.name,
42
- labelField = options.labelField,
43
- template = options.template,
44
- autoRefresh = options.autoRefresh,
45
- method = options.method,
46
- renderMode = options.renderMode,
47
- style = options.style,
48
- _options$show = options.show,
49
- show = _options$show === void 0 ? true : _options$show,
50
- legend = options.legend,
51
- group = options.group,
52
- map = options.map;
53
- if (group !== null && group !== void 0 && group.length) {
54
- if (!show) {
55
- group.map(function (f) {
56
- f.show = false;
57
- });
58
- } else {
59
- group.map(function (f) {
60
- var _f$show;
61
- f.show = (_f$show = f.show) !== null && _f$show !== void 0 ? _f$show : true;
62
- });
63
- }
64
- }
65
- _this2 = _super.call(this, options);
66
- _set((_thisSuper = _assertThisInitialized(_this2), _getPrototypeOf(DemandLayer.prototype)), "show", show, _thisSuper, true);
67
-
68
- // 接口地址
69
- _this2.url = url;
70
-
71
- // 接口地址请求类型
72
- _this2.method = method;
73
-
74
- // 接口查询参数
75
- _this2.params = params;
76
-
77
- // 图层标识
78
- _this2.key = key;
79
-
80
- // 图层名称
81
- _this2.name = name;
82
-
83
- // 渲染
84
- _this2.style = style;
85
-
86
- // 标签字段
87
- _this2.labelField = labelField;
88
-
89
- // 自动刷新标识
90
- _this2.autoRefresh = autoRefresh;
91
-
92
- // 模版内容
93
- _this2.template = template;
94
-
95
- // 渲染模式
96
- _this2.renderMode = renderMode || 'marker';
97
-
98
- // 图例
99
- _this2.legend = legend;
100
-
101
- // 过滤
102
- _this2.group = group;
103
-
104
- // 地图
105
- _this2.map = map;
106
-
107
- // 是否存在地址
108
- if (url) {
109
- // 执行
110
- _this2.loadUrlData(url, params, method);
111
- }
112
-
113
- // 直接加载数据
114
- if (data) {
115
- // 执行
116
- _this2.loadData(data);
117
- }
118
- return _this2;
119
- }
120
-
121
- // 重写父类的属性访问器
122
- _createClass(DemandLayer, [{
123
- key: "show",
124
- get: function get() {
125
- return _get(_getPrototypeOf(DemandLayer.prototype), "show", this);
126
- },
127
- set: function set(value) {
128
- this.setVisible(value);
129
- }
130
-
131
- // 获取地图
132
- }, {
133
- key: "getMap",
134
- value: function getMap() {
135
- return this.map;
136
- }
137
-
138
- // 根据条件获取图形数据
139
- }, {
140
- key: "getFeatureByFieldValue",
141
- value: function getFeatureByFieldValue(field, value) {
142
- return this.getSource().getFeatures().find(function (v) {
143
- return v.values_[field] === value;
144
- });
145
- }
146
-
147
- // 获取当前图层的所有图形
148
- }, {
149
- key: "getFeatures",
150
- value: function getFeatures() {
151
- return this.entities.values;
152
- }
153
-
154
- // 设置图层显示隐藏
155
- }, {
156
- key: "setVisible",
157
- value: function setVisible(visible) {
158
- _set(_getPrototypeOf(DemandLayer.prototype), "show", visible, this, true); // 将属性传递给父类
159
-
160
- var map = this.getMap && this.getMap();
161
- if (map) {
162
- map.layers.emit('visible', this, visible);
163
- }
164
- }
165
-
166
- // 设置过滤条件
167
- }, {
168
- key: "setGroup",
169
- value: function setGroup(group) {
170
- var features = this.getFeatures();
171
- var map = this.getMap && this.getMap();
172
- if (group !== null && group !== void 0 && group.length && features !== null && features !== void 0 && features.length) {
173
- features.map(function (feature) {
174
- var show = false;
175
- group.map(function (v) {
176
- if (!v.hasOwnProperty('show') || v.show) {
177
- var properties = map.getProperties(feature);
178
- if (v.filter(properties)) {
179
- show = true;
180
- }
181
- }
182
- });
183
- feature.show = show;
184
- });
185
- this.group = group;
186
- this.setVisibleByGroup();
187
- }
188
- }
189
-
190
- // 根据过滤条件组显示图层
191
- }, {
192
- key: "setVisibleByGroup",
193
- value: function setVisibleByGroup() {
194
- var group = this.group;
195
- if (group !== null && group !== void 0 && group.length) {
196
- var visible = false;
197
- group.map(function (v) {
198
- if (!v.hasOwnProperty('show') || v.show) {
199
- visible = true;
200
- }
201
- });
202
- this.setVisible(visible);
203
- }
204
- }
205
-
206
- // 设置渲染模式
207
- }, {
208
- key: "setRenderMode",
209
- value: function setRenderMode(renderMode) {
210
- this.hideClustering();
211
-
212
- // 展示聚合时设置样式为 marker 并且开启聚合监听
213
- if (renderMode === 'clustering') {
214
- this.renderMode = 'marker';
215
- this.setStyle();
216
- this.showClustering();
217
- } else {
218
- this.renderMode = renderMode;
219
- this.setStyle();
220
- }
221
- }
222
-
223
- // 自动刷新
224
- }, {
225
- key: "refresh",
226
- value: function refresh() {
227
- (0, _createFeatureCollection.getDataByHttp)(this.url, this.params, this.method).then(function (res) {
228
- var _res$features;
229
- if (res !== null && res !== void 0 && (_res$features = res.features) !== null && _res$features !== void 0 && _res$features.length) {}
230
- });
231
- }
232
-
233
- // 加载数据
234
- }, {
235
- key: "loadData",
236
- value: function loadData(data) {
237
- this.entities.removeAll();
238
- var geoJsonData = (0, _createFeatureCollection.createFeatureCollection)(Array.isArray(data) ? data : [data]);
239
- this.render(geoJsonData);
240
- }
241
-
242
- // 加载接口数据
243
- }, {
244
- key: "loadUrlData",
245
- value: function loadUrlData(url, params, method) {
246
- var _this3 = this;
247
- this.entities.removeAll();
248
- (0, _createFeatureCollection.getDataByHttp)(url, params, method).then(function (res) {
249
- var _res$features2;
250
- if (res !== null && res !== void 0 && (_res$features2 = res.features) !== null && _res$features2 !== void 0 && _res$features2.length) {
251
- _this3.render(res);
252
- }
253
- });
254
- }
255
-
256
- // 加载图形数据
257
- }, {
258
- key: "loadFeatures",
259
- value: function loadFeatures(features) {
260
- this.entities.removeAll();
261
- this.getSource().addFeatures(features);
262
- }
263
-
264
- // 渲染
265
- }, {
266
- key: "render",
267
- value: function render(geoJsonData) {
268
- var _this4 = this;
269
- if (geoJsonData) {
270
- var group = this.group;
271
- var features = geoJsonData.features;
272
- features.map(function (v) {
273
- var entity = createFeature(v);
274
- if (entity) {
275
- var _this4$group, _style, _style2;
276
- var show = true;
277
- var style = _this4.style;
278
-
279
- // 针对过滤时的处理
280
- if ((_this4$group = _this4.group) !== null && _this4$group !== void 0 && _this4$group.length) {
281
- show = false;
282
- group.map(function (f) {
283
- if (f.filter(v.properties)) {
284
- style = f.style;
285
- if (!f.hasOwnProperty('show') || f.show) {
286
- show = true;
287
- }
288
- }
289
- });
290
- }
291
- setRenderer(entity, style);
292
- if (((_style = style) === null || _style === void 0 ? void 0 : _style.type) === 'Marker' && (_style2 = style) !== null && _style2 !== void 0 && _style2.style) {
293
- var _style$style = style.style,
294
- image = _style$style.image,
295
- imageType = _style$style.imageType,
296
- imageKey = _style$style.imageKey;
297
- if (image && imageType) {
298
- if (imageType === 'gif') {
299
- entity.setGifImage(image, imageKey);
300
- }
301
- }
302
- }
303
- entity.show = show;
304
- entity.type = _this4.modalType || _this4.key;
305
- entity.key = _this4.key;
306
- entity.properties = v.properties || {};
307
- _this4.entities.add(entity);
308
- }
309
- });
310
- }
311
- }
312
-
313
- // 设置样式
314
- }, {
315
- key: "setStyle",
316
- value: function setStyle() {
317
- var _this5 = this;
318
- if (this.renderMode === 'point') {
319
- this.entities.values.map(function (entity) {
320
- setRenderer(entity, {
321
- type: 'Marker',
322
- style: {
323
- type: 'PointIcon',
324
- color: '#0080ff',
325
- size: 15
326
- }
327
- });
328
- });
329
- } else {
330
- this.entities.values.map(function (entity) {
331
- setRenderer(entity, _this5.style);
332
- });
333
- }
334
- }
335
-
336
- // 展示聚合
337
- }, {
338
- key: "showClustering",
339
- value: function showClustering() {
340
- // 是否聚合
341
- this.customStyle();
342
- this.clustering.pixelRange = 100;
343
- this.clustering.minimumClusterSize = 2;
344
- this.clustering.enabled = true;
345
- }
346
-
347
- // 隐藏聚合
348
- }, {
349
- key: "hideClustering",
350
- value: function hideClustering() {
351
- this.clustering.enabled = false;
352
- if ((0, _cesium.defined)(this.removeListener) && this.removeListener) {
353
- this.removeListener();
354
- this.removeListener = undefined;
355
- }
356
- }
357
-
358
- // 自定义样式
359
- }, {
360
- key: "customStyle",
361
- value: function customStyle() {
362
- var _this = this;
363
- if ((0, _cesium.defined)(this.removeListener) && this.removeListener) {
364
- this.removeListener();
365
- this.removeListener = undefined;
366
- } else {
367
- this.removeListener = this.clustering.clusterEvent.addEventListener(function (clusteredEntities, cluster) {
368
- cluster.label.show = false;
369
- cluster.billboard.show = true;
370
- cluster.billboard.id = cluster.label.id;
371
- cluster.billboard.verticalOrigin = _cesium.VerticalOrigin.BOTTOM;
372
- cluster.billboard.heightReference = _cesium.HeightReference.CLAMP_TO_GROUND;
373
- cluster.billboard.horizontalOrigin = _cesium.HorizontalOrigin.CENTER;
374
- cluster.billboard.disableDepthTestDistance = 10000;
375
- var text = clusteredEntities.length;
376
- var color = 'rgb(9,220,107)';
377
- if (clusteredEntities.length >= 50) {
378
- text = '50+';
379
- color = 'rgb(220,33,9)';
380
- } else if (clusteredEntities.length >= 40) {
381
- text = '40+';
382
- color = 'rgb(232,119,5)';
383
- } else if (clusteredEntities.length >= 30) {
384
- text = '30+';
385
- color = 'rgb(232,194,4)';
386
- } else if (clusteredEntities.length >= 20) {
387
- text = '20+';
388
- color = 'rgba(20, 232, 4, 1)';
389
- } else if (clusteredEntities.length >= 10) {
390
- text = '10+';
391
- color = 'rgb(0,128,255)';
392
- }
393
- cluster.billboard.image = new _CockpitIcon["default"]({
394
- canvasIcon: _this.style,
395
- color: color,
396
- hideFooter: true,
397
- info: [{
398
- text: text,
399
- fontSize: 24
400
- }]
401
- }).getImgUrl();
402
- });
403
- }
404
- }
405
- }]);
406
- return DemandLayer;
407
- }(_FeatureLayer2["default"]);
408
- var _default = DemandLayer;
409
- exports["default"] = _default;
410
- //# sourceMappingURL=DemandLayer.js.map