@vtx/cs-map 1.0.37 → 1.0.38

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 (382) hide show
  1. package/package.json +1 -1
  2. package/lib/_util/EventEmitter.js +0 -80
  3. package/lib/_util/EventEmitter.js.map +0 -1
  4. package/lib/_util/Provider.js +0 -14
  5. package/lib/_util/Provider.js.map +0 -1
  6. package/lib/_util/filterSpecialCharacters.js +0 -90
  7. package/lib/_util/filterSpecialCharacters.js.map +0 -1
  8. package/lib/_util/generateRandomPosition.js +0 -25
  9. package/lib/_util/generateRandomPosition.js.map +0 -1
  10. package/lib/_util/getBBoxFromGeojson.js +0 -68
  11. package/lib/_util/getBBoxFromGeojson.js.map +0 -1
  12. package/lib/_util/getComponentProps.js +0 -14
  13. package/lib/_util/getComponentProps.js.map +0 -1
  14. package/lib/_util/getCookie.js +0 -25
  15. package/lib/_util/getCookie.js.map +0 -1
  16. package/lib/_util/getDefaultMapInfo.js +0 -34
  17. package/lib/_util/getDefaultMapInfo.js.map +0 -1
  18. package/lib/_util/getSystemInfo.js +0 -27
  19. package/lib/_util/getSystemInfo.js.map +0 -1
  20. package/lib/_util/getToken.js +0 -14
  21. package/lib/_util/getToken.js.map +0 -1
  22. package/lib/_util/getUrlParam.js +0 -16
  23. package/lib/_util/getUrlParam.js.map +0 -1
  24. package/lib/_util/http.js +0 -234
  25. package/lib/_util/http.js.map +0 -1
  26. package/lib/_util/isFunction.js +0 -10
  27. package/lib/_util/isFunction.js.map +0 -1
  28. package/lib/_util/isObject.js +0 -10
  29. package/lib/_util/isObject.js.map +0 -1
  30. package/lib/_util/layer.js +0 -138
  31. package/lib/_util/layer.js.map +0 -1
  32. package/lib/_util/mapTool.js +0 -188
  33. package/lib/_util/mapTool.js.map +0 -1
  34. package/lib/_util/setCookie.js +0 -16
  35. package/lib/_util/setCookie.js.map +0 -1
  36. package/lib/_util/transformRgb.js +0 -34
  37. package/lib/_util/transformRgb.js.map +0 -1
  38. package/lib/_util/useColSize.js +0 -29
  39. package/lib/_util/useColSize.js.map +0 -1
  40. package/lib/_util/useInterval.js +0 -19
  41. package/lib/_util/useInterval.js.map +0 -1
  42. package/lib/_util/useProps.js +0 -15
  43. package/lib/_util/useProps.js.map +0 -1
  44. package/lib/_util/useSet.js +0 -45
  45. package/lib/_util/useSet.js.map +0 -1
  46. package/lib/assets/base-img-1.png +0 -0
  47. package/lib/assets/base-img-2.png +0 -0
  48. package/lib/assets/base-img-3.png +0 -0
  49. package/lib/assets/base-img-4.png +0 -0
  50. package/lib/assets/base-img-5.png +0 -0
  51. package/lib/assets/base-img.png +0 -0
  52. package/lib/assets/bz.png +0 -0
  53. package/lib/assets/colors.png +0 -0
  54. package/lib/assets/colors1.png +0 -0
  55. package/lib/assets/ll.png +0 -0
  56. package/lib/assets/people.gif +0 -0
  57. package/lib/assets/sw.png +0 -0
  58. package/lib/assets/water.png +0 -0
  59. package/lib/assets/yl.png +0 -0
  60. package/lib/cesium-tiles-layer/CesiumTilesLayer.js +0 -57
  61. package/lib/cesium-tiles-layer/CesiumTilesLayer.js.map +0 -1
  62. package/lib/cesium-tiles-layer/index.js +0 -73
  63. package/lib/cesium-tiles-layer/index.js.map +0 -1
  64. package/lib/cesium-tiles-layer/style/css.js +0 -4
  65. package/lib/cesium-tiles-layer/style/css.js.map +0 -1
  66. package/lib/cesium-tiles-layer/style/index.css +0 -0
  67. package/lib/cesium-tiles-layer/style/index.js +0 -4
  68. package/lib/cesium-tiles-layer/style/index.js.map +0 -1
  69. package/lib/cesium-tiles-layer/style/index.less +0 -0
  70. package/lib/circle/circle.js +0 -68
  71. package/lib/circle/circle.js.map +0 -1
  72. package/lib/circle/index.js +0 -49
  73. package/lib/circle/index.js.map +0 -1
  74. package/lib/circle/style/css.js +0 -2
  75. package/lib/circle/style/css.js.map +0 -1
  76. package/lib/circle/style/index.js +0 -2
  77. package/lib/circle/style/index.js.map +0 -1
  78. package/lib/config.js +0 -13
  79. package/lib/config.js.map +0 -1
  80. package/lib/demand-layer/DemandLayer.js +0 -410
  81. package/lib/demand-layer/DemandLayer.js.map +0 -1
  82. package/lib/demand-layer/index.js +0 -104
  83. package/lib/demand-layer/index.js.map +0 -1
  84. package/lib/demand-layer/style/css.js +0 -4
  85. package/lib/demand-layer/style/css.js.map +0 -1
  86. package/lib/demand-layer/style/index.css +0 -0
  87. package/lib/demand-layer/style/index.js +0 -4
  88. package/lib/demand-layer/style/index.js.map +0 -1
  89. package/lib/demand-layer/style/index.less +0 -0
  90. package/lib/events/index.js +0 -29
  91. package/lib/events/index.js.map +0 -1
  92. package/lib/feature-layer/FeatureLayer.js +0 -448
  93. package/lib/feature-layer/FeatureLayer.js.map +0 -1
  94. package/lib/feature-layer/createFeatureCollection.js +0 -133
  95. package/lib/feature-layer/createFeatureCollection.js.map +0 -1
  96. package/lib/feature-layer/index.js +0 -115
  97. package/lib/feature-layer/index.js.map +0 -1
  98. package/lib/feature-layer/style/css.js +0 -4
  99. package/lib/feature-layer/style/css.js.map +0 -1
  100. package/lib/feature-layer/style/index.css +0 -0
  101. package/lib/feature-layer/style/index.js +0 -4
  102. package/lib/feature-layer/style/index.js.map +0 -1
  103. package/lib/feature-layer/style/index.less +0 -0
  104. package/lib/fly-line-layer/FlyLineLayer.js +0 -260
  105. package/lib/fly-line-layer/FlyLineLayer.js.map +0 -1
  106. package/lib/fly-line-layer/index.js +0 -90
  107. package/lib/fly-line-layer/index.js.map +0 -1
  108. package/lib/fly-line-layer/lineFlowMaterialProperty.js +0 -90
  109. package/lib/fly-line-layer/lineFlowMaterialProperty.js.map +0 -1
  110. package/lib/fly-line-layer/style/css.js +0 -4
  111. package/lib/fly-line-layer/style/css.js.map +0 -1
  112. package/lib/fly-line-layer/style/index.css +0 -0
  113. package/lib/fly-line-layer/style/index.js +0 -4
  114. package/lib/fly-line-layer/style/index.js.map +0 -1
  115. package/lib/fly-line-layer/style/index.less +0 -0
  116. package/lib/gif-dom-layer/GifDomLayer.js +0 -105
  117. package/lib/gif-dom-layer/GifDomLayer.js.map +0 -1
  118. package/lib/gif-dom-layer/index.js +0 -44
  119. package/lib/gif-dom-layer/index.js.map +0 -1
  120. package/lib/gif-dom-layer/style/css.js +0 -4
  121. package/lib/gif-dom-layer/style/css.js.map +0 -1
  122. package/lib/gif-dom-layer/style/index.css +0 -0
  123. package/lib/gif-dom-layer/style/index.js +0 -4
  124. package/lib/gif-dom-layer/style/index.js.map +0 -1
  125. package/lib/gif-dom-layer/style/index.less +0 -0
  126. package/lib/gradation-line-layer/GradationLineLayer.js +0 -104
  127. package/lib/gradation-line-layer/GradationLineLayer.js.map +0 -1
  128. package/lib/gradation-line-layer/index.js +0 -83
  129. package/lib/gradation-line-layer/index.js.map +0 -1
  130. package/lib/gradation-line-layer/style/css.js +0 -4
  131. package/lib/gradation-line-layer/style/css.js.map +0 -1
  132. package/lib/gradation-line-layer/style/index.css +0 -0
  133. package/lib/gradation-line-layer/style/index.js +0 -4
  134. package/lib/gradation-line-layer/style/index.js.map +0 -1
  135. package/lib/gradation-line-layer/style/index.less +0 -0
  136. package/lib/group-layer/GroupLayer.js +0 -132
  137. package/lib/group-layer/GroupLayer.js.map +0 -1
  138. package/lib/group-layer/index.js +0 -71
  139. package/lib/group-layer/index.js.map +0 -1
  140. package/lib/group-layer/style/css.js +0 -4
  141. package/lib/group-layer/style/css.js.map +0 -1
  142. package/lib/group-layer/style/index.css +0 -0
  143. package/lib/group-layer/style/index.js +0 -4
  144. package/lib/group-layer/style/index.js.map +0 -1
  145. package/lib/group-layer/style/index.less +0 -0
  146. package/lib/heatmap-layer/CesiumHeatmap.js +0 -446
  147. package/lib/heatmap-layer/CesiumHeatmap.js.map +0 -1
  148. package/lib/heatmap-layer/HeatmapLayer.js +0 -158
  149. package/lib/heatmap-layer/HeatmapLayer.js.map +0 -1
  150. package/lib/heatmap-layer/heatmap.js +0 -612
  151. package/lib/heatmap-layer/heatmap.js.map +0 -1
  152. package/lib/heatmap-layer/index.js +0 -90
  153. package/lib/heatmap-layer/index.js.map +0 -1
  154. package/lib/heatmap-layer/style/css.js +0 -4
  155. package/lib/heatmap-layer/style/css.js.map +0 -1
  156. package/lib/heatmap-layer/style/index.css +0 -0
  157. package/lib/heatmap-layer/style/index.js +0 -4
  158. package/lib/heatmap-layer/style/index.js.map +0 -1
  159. package/lib/heatmap-layer/style/index.less +0 -0
  160. package/lib/highlight-layer/HighlightLayer.js +0 -245
  161. package/lib/highlight-layer/HighlightLayer.js.map +0 -1
  162. package/lib/highlight-layer/index.js +0 -25
  163. package/lib/highlight-layer/index.js.map +0 -1
  164. package/lib/highlight-layer/style/css.js +0 -4
  165. package/lib/highlight-layer/style/css.js.map +0 -1
  166. package/lib/highlight-layer/style/index.css +0 -0
  167. package/lib/highlight-layer/style/index.js +0 -4
  168. package/lib/highlight-layer/style/index.js.map +0 -1
  169. package/lib/highlight-layer/style/index.less +0 -0
  170. package/lib/image-layer/ImageLayer.js +0 -241
  171. package/lib/image-layer/ImageLayer.js.map +0 -1
  172. package/lib/image-layer/index.js +0 -134
  173. package/lib/image-layer/index.js.map +0 -1
  174. package/lib/image-layer/style/css.js +0 -4
  175. package/lib/image-layer/style/css.js.map +0 -1
  176. package/lib/image-layer/style/index.css +0 -0
  177. package/lib/image-layer/style/index.js +0 -4
  178. package/lib/image-layer/style/index.js.map +0 -1
  179. package/lib/image-layer/style/index.less +0 -0
  180. package/lib/index.js +0 -147
  181. package/lib/index.js.map +0 -1
  182. package/lib/label/Label.js +0 -75
  183. package/lib/label/Label.js.map +0 -1
  184. package/lib/label/index.js +0 -51
  185. package/lib/label/index.js.map +0 -1
  186. package/lib/label/style/css.js +0 -2
  187. package/lib/label/style/css.js.map +0 -1
  188. package/lib/label/style/index.js +0 -2
  189. package/lib/label/style/index.js.map +0 -1
  190. package/lib/legend/index.js +0 -210
  191. package/lib/legend/index.js.map +0 -1
  192. package/lib/legend/style/css.js +0 -8
  193. package/lib/legend/style/css.js.map +0 -1
  194. package/lib/legend/style/index.css +0 -60
  195. package/lib/legend/style/index.js +0 -8
  196. package/lib/legend/style/index.js.map +0 -1
  197. package/lib/legend/style/index.less +0 -63
  198. package/lib/line-flow-layer/LineFlowLayer.js +0 -106
  199. package/lib/line-flow-layer/LineFlowLayer.js.map +0 -1
  200. package/lib/line-flow-layer/index.js +0 -34
  201. package/lib/line-flow-layer/index.js.map +0 -1
  202. package/lib/line-flow-layer/style/css.js +0 -4
  203. package/lib/line-flow-layer/style/css.js.map +0 -1
  204. package/lib/line-flow-layer/style/index.css +0 -0
  205. package/lib/line-flow-layer/style/index.js +0 -4
  206. package/lib/line-flow-layer/style/index.js.map +0 -1
  207. package/lib/line-flow-layer/style/index.less +0 -0
  208. package/lib/map/InfoTool/index.css +0 -55
  209. package/lib/map/InfoTool/index.js +0 -247
  210. package/lib/map/InfoTool/index.js.map +0 -1
  211. package/lib/map/InfoTool/index.less +0 -46
  212. package/lib/map/InfoTool/util.js +0 -113
  213. package/lib/map/InfoTool/util.js.map +0 -1
  214. package/lib/map/InfoWindow.js +0 -72
  215. package/lib/map/InfoWindow.js.map +0 -1
  216. package/lib/map/Layers.js +0 -287
  217. package/lib/map/Layers.js.map +0 -1
  218. package/lib/map/Popup.js +0 -316
  219. package/lib/map/Popup.js.map +0 -1
  220. package/lib/map/base/imagery/amap/AmapImageryProvider.js +0 -47
  221. package/lib/map/base/imagery/amap/AmapImageryProvider.js.map +0 -1
  222. package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js +0 -47
  223. package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js.map +0 -1
  224. package/lib/map/base/imagery/baidu/BaiduImageryProvider.js +0 -147
  225. package/lib/map/base/imagery/baidu/BaiduImageryProvider.js.map +0 -1
  226. package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js +0 -378
  227. package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js.map +0 -1
  228. package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js +0 -122
  229. package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js.map +0 -1
  230. package/lib/map/base/imagery/geoq/GeoQImageryProvider.js +0 -49
  231. package/lib/map/base/imagery/geoq/GeoQImageryProvider.js.map +0 -1
  232. package/lib/map/base/imagery/google/GoogleImageryProvider.js +0 -42
  233. package/lib/map/base/imagery/google/GoogleImageryProvider.js.map +0 -1
  234. package/lib/map/base/imagery/tdt/TdtImageryProvider.js +0 -39
  235. package/lib/map/base/imagery/tdt/TdtImageryProvider.js.map +0 -1
  236. package/lib/map/base/imagery/tencent/TencentImageryProvider.js +0 -60
  237. package/lib/map/base/imagery/tencent/TencentImageryProvider.js.map +0 -1
  238. package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js +0 -47
  239. package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js.map +0 -1
  240. package/lib/map/base/imagery/transform/CoordTransform.js +0 -174
  241. package/lib/map/base/imagery/transform/CoordTransform.js.map +0 -1
  242. package/lib/map/base/index.js +0 -207
  243. package/lib/map/base/index.js.map +0 -1
  244. package/lib/map/hooks/useGetMapFeatureInfoByText.js +0 -211
  245. package/lib/map/hooks/useGetMapFeatureInfoByText.js.map +0 -1
  246. package/lib/map/index.js +0 -800
  247. package/lib/map/index.js.map +0 -1
  248. package/lib/map/material/AroundPoint.js +0 -66
  249. package/lib/map/material/AroundPoint.js.map +0 -1
  250. package/lib/map/material/CircleRippleMaterialProperty.js +0 -89
  251. package/lib/map/material/CircleRippleMaterialProperty.js.map +0 -1
  252. package/lib/map/material/ODLineLayer.js +0 -92
  253. package/lib/map/material/ODLineLayer.js.map +0 -1
  254. package/lib/map/material/PolylineTrailLinkMaterialProperty.js +0 -101
  255. package/lib/map/material/PolylineTrailLinkMaterialProperty.js.map +0 -1
  256. package/lib/map/material/PolylineTrailMaterialProperty.js +0 -102
  257. package/lib/map/material/PolylineTrailMaterialProperty.js.map +0 -1
  258. package/lib/map/material/TilesBuilding.js +0 -208
  259. package/lib/map/material/TilesBuilding.js.map +0 -1
  260. package/lib/map/material/assets/colors1.png +0 -0
  261. package/lib/map/material/assets/colors2.png +0 -0
  262. package/lib/map/material/index.js +0 -17
  263. package/lib/map/material/index.js.map +0 -1
  264. package/lib/map/style/css.js +0 -4
  265. package/lib/map/style/css.js.map +0 -1
  266. package/lib/map/style/index.css +0 -155
  267. package/lib/map/style/index.js +0 -4
  268. package/lib/map/style/index.js.map +0 -1
  269. package/lib/map/style/index.less +0 -149
  270. package/lib/marker/Marker.js +0 -113
  271. package/lib/marker/Marker.js.map +0 -1
  272. package/lib/marker/index.js +0 -49
  273. package/lib/marker/index.js.map +0 -1
  274. package/lib/marker/style/css.js +0 -2
  275. package/lib/marker/style/css.js.map +0 -1
  276. package/lib/marker/style/index.js +0 -2
  277. package/lib/marker/style/index.js.map +0 -1
  278. package/lib/point/Point.js +0 -70
  279. package/lib/point/Point.js.map +0 -1
  280. package/lib/point/index.js +0 -49
  281. package/lib/point/index.js.map +0 -1
  282. package/lib/point/style/css.js +0 -2
  283. package/lib/point/style/css.js.map +0 -1
  284. package/lib/point/style/index.js +0 -2
  285. package/lib/point/style/index.js.map +0 -1
  286. package/lib/polygon/Polygon.js +0 -68
  287. package/lib/polygon/Polygon.js.map +0 -1
  288. package/lib/polygon/index.js +0 -49
  289. package/lib/polygon/index.js.map +0 -1
  290. package/lib/polygon/style/css.js +0 -2
  291. package/lib/polygon/style/css.js.map +0 -1
  292. package/lib/polygon/style/index.js +0 -2
  293. package/lib/polygon/style/index.js.map +0 -1
  294. package/lib/polyline/Polyline.js +0 -69
  295. package/lib/polyline/Polyline.js.map +0 -1
  296. package/lib/polyline/index.js +0 -49
  297. package/lib/polyline/index.js.map +0 -1
  298. package/lib/polyline/style/css.js +0 -2
  299. package/lib/polyline/style/css.js.map +0 -1
  300. package/lib/polyline/style/index.js +0 -2
  301. package/lib/polyline/style/index.js.map +0 -1
  302. package/lib/renderer/index.js +0 -281
  303. package/lib/renderer/index.js.map +0 -1
  304. package/lib/renderer/style/css.js +0 -4
  305. package/lib/renderer/style/css.js.map +0 -1
  306. package/lib/renderer/style/index.css +0 -0
  307. package/lib/renderer/style/index.js +0 -4
  308. package/lib/renderer/style/index.js.map +0 -1
  309. package/lib/renderer/style/index.less +0 -0
  310. package/lib/style/index.css +0 -0
  311. package/lib/style/index.less +0 -2
  312. package/lib/style/themes/compact.css +0 -0
  313. package/lib/style/themes/compact.less +0 -1
  314. package/lib/style/themes/dark.css +0 -0
  315. package/lib/style/themes/dark.less +0 -9
  316. package/lib/style/themes/default.css +0 -0
  317. package/lib/style/themes/default.less +0 -7
  318. package/lib/style/themes/index.css +0 -0
  319. package/lib/style/themes/index.less +0 -1
  320. package/lib/style/themes/variable.css +0 -0
  321. package/lib/style/themes/variable.less +0 -5
  322. package/lib/tools/assets/footer.png +0 -0
  323. package/lib/tools/assets/layer.png +0 -0
  324. package/lib/tools/assets/search.png +0 -0
  325. package/lib/tools/base-map-switch/index.js +0 -103
  326. package/lib/tools/base-map-switch/index.js.map +0 -1
  327. package/lib/tools/dimension-switch/index.js +0 -38
  328. package/lib/tools/dimension-switch/index.js.map +0 -1
  329. package/lib/tools/index.js +0 -50
  330. package/lib/tools/index.js.map +0 -1
  331. package/lib/tools/layer-control/index.js +0 -166
  332. package/lib/tools/layer-control/index.js.map +0 -1
  333. package/lib/tools/map-search/Select/index.js +0 -56
  334. package/lib/tools/map-search/Select/index.js.map +0 -1
  335. package/lib/tools/map-search/Select/style/css.js +0 -4
  336. package/lib/tools/map-search/Select/style/css.js.map +0 -1
  337. package/lib/tools/map-search/Select/style/index.css +0 -45
  338. package/lib/tools/map-search/Select/style/index.js +0 -4
  339. package/lib/tools/map-search/Select/style/index.js.map +0 -1
  340. package/lib/tools/map-search/Select/style/index.less +0 -47
  341. package/lib/tools/map-search/index.js +0 -204
  342. package/lib/tools/map-search/index.js.map +0 -1
  343. package/lib/tools/style/css.js +0 -8
  344. package/lib/tools/style/css.js.map +0 -1
  345. package/lib/tools/style/index.css +0 -197
  346. package/lib/tools/style/index.js +0 -8
  347. package/lib/tools/style/index.js.map +0 -1
  348. package/lib/tools/style/index.less +0 -213
  349. package/lib/tools/tools-item/index.js +0 -67
  350. package/lib/tools/tools-item/index.js.map +0 -1
  351. package/lib/trail-polyline-layer/TrailPolylineLayer.js +0 -82
  352. package/lib/trail-polyline-layer/TrailPolylineLayer.js.map +0 -1
  353. package/lib/trail-polyline-layer/TrailPolylineMaterial.js +0 -31
  354. package/lib/trail-polyline-layer/TrailPolylineMaterial.js.map +0 -1
  355. package/lib/trail-polyline-layer/index.js +0 -28
  356. package/lib/trail-polyline-layer/index.js.map +0 -1
  357. package/lib/trail-polyline-layer/style/css.js +0 -4
  358. package/lib/trail-polyline-layer/style/css.js.map +0 -1
  359. package/lib/trail-polyline-layer/style/index.css +0 -0
  360. package/lib/trail-polyline-layer/style/index.js +0 -4
  361. package/lib/trail-polyline-layer/style/index.js.map +0 -1
  362. package/lib/trail-polyline-layer/style/index.less +0 -0
  363. package/lib/water-surface-layer/WaterSurfaceLayer.js +0 -87
  364. package/lib/water-surface-layer/WaterSurfaceLayer.js.map +0 -1
  365. package/lib/water-surface-layer/index.js +0 -28
  366. package/lib/water-surface-layer/index.js.map +0 -1
  367. package/lib/water-surface-layer/style/css.js +0 -4
  368. package/lib/water-surface-layer/style/css.js.map +0 -1
  369. package/lib/water-surface-layer/style/index.css +0 -0
  370. package/lib/water-surface-layer/style/index.js +0 -4
  371. package/lib/water-surface-layer/style/index.js.map +0 -1
  372. package/lib/water-surface-layer/style/index.less +0 -0
  373. package/lib/weather/Weather.js +0 -175
  374. package/lib/weather/Weather.js.map +0 -1
  375. package/lib/weather/index.js +0 -37
  376. package/lib/weather/index.js.map +0 -1
  377. package/lib/weather/style/css.js +0 -8
  378. package/lib/weather/style/css.js.map +0 -1
  379. package/lib/weather/style/index.css +0 -60
  380. package/lib/weather/style/index.js +0 -8
  381. package/lib/weather/style/index.js.map +0 -1
  382. package/lib/weather/style/index.less +0 -63
@@ -1,102 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _cesium = require("cesium");
8
- var _colors = _interopRequireDefault(require("./assets/colors2.png"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
- 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); }
11
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
- 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); } }
13
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
- 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); }
16
- var PolylineTrailMaterialProperty = /*#__PURE__*/function () {
17
- function PolylineTrailMaterialProperty() {
18
- var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
19
- _classCallCheck(this, PolylineTrailMaterialProperty);
20
- this._definitionChanged = new _cesium.Event();
21
- this._color = undefined;
22
- this._colorSubscription = undefined;
23
- this._time = new Date().getTime();
24
- this.color = option.color ? option.color : _cesium.Color.fromCssColorString('rgba(90, 90, 255, 1)');
25
- this.duration = option.duration ? option.duration : 5000;
26
- this.trailImage = option.trailImage ? option.trailImage : _colors["default"];
27
-
28
- // 类型(会自动加载到 cesium 中)
29
- this.type = option.type ? option.type : 'PolylineTrail';
30
-
31
- // 着色器
32
- this.source = option.source ? option.source : "\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture2D(image, vec2(fract(st.s - time), st.t));\n material.alpha = colorImage.a * color.a;\n material.diffuse = (colorImage.rgb+color.rgb)/2.0;\n return material;\n }\n ";
33
- this.addMaterial();
34
- }
35
- _createClass(PolylineTrailMaterialProperty, [{
36
- key: "getType",
37
- value: function getType() {
38
- return 'PolylineTrail';
39
- }
40
- }, {
41
- key: "getValue",
42
- value: function getValue(time, result) {
43
- var _result = result;
44
- if (!(0, _cesium.defined)(_result)) {
45
- _result = {};
46
- }
47
- _result.color = _cesium.Property.getValueOrClonedDefault(this._color, time, _cesium.Color.WHITE, _result.color);
48
- _result.image = this.trailImage;
49
- _result.time = (new Date().getTime() - this._time) % this.duration / this.duration;
50
- return _result;
51
- }
52
- }, {
53
- key: "equals",
54
- value: function equals(other) {
55
- return this === other || other instanceof PolylineTrailMaterialProperty && _cesium.Property.equals(this._color, other._color);
56
- }
57
- }, {
58
- key: "addMaterial",
59
- value: function addMaterial() {
60
- var _this = this;
61
- _cesium.Material._materialCache.addMaterial(this.type, {
62
- fabric: {
63
- type: this.type,
64
- uniforms: {
65
- color: new _cesium.Color(1.0, 0.0, 0.0, 0.5),
66
- image: this.trailImage,
67
- time: 100
68
- },
69
- source: this.source
70
- },
71
- translucent: function translucent() {
72
- return true;
73
- }
74
- });
75
-
76
- // 注意 defineProperties 会报错,需要改为 Object
77
- Object.defineProperties(PolylineTrailMaterialProperty.prototype, {
78
- isConstant: {
79
- get: function get() {
80
- return false;
81
- },
82
- configurable: true
83
- },
84
- definitionChanged: {
85
- get: function get() {
86
- return _this._definitionChanged;
87
- },
88
- configurable: true
89
- },
90
- color: {
91
- value: (0, _cesium.createPropertyDescriptor)('color'),
92
- configurable: true,
93
- writable: true
94
- }
95
- });
96
- }
97
- }]);
98
- return PolylineTrailMaterialProperty;
99
- }();
100
- var _default = PolylineTrailMaterialProperty;
101
- exports["default"] = _default;
102
- //# sourceMappingURL=PolylineTrailMaterialProperty.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PolylineTrailMaterialProperty.js","names":["_cesium","require","_colors","_interopRequireDefault","obj","__esModule","_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","call","Number","PolylineTrailMaterialProperty","option","arguments","_definitionChanged","Event","_color","_colorSubscription","_time","Date","getTime","color","Color","fromCssColorString","duration","trailImage","img","type","source","addMaterial","value","getType","getValue","time","result","_result","defined","Property","getValueOrClonedDefault","WHITE","image","equals","other","_this","Material","_materialCache","fabric","uniforms","translucent","defineProperties","isConstant","get","definitionChanged","createPropertyDescriptor","_default","exports"],"sources":["map/material/PolylineTrailMaterialProperty.js"],"sourcesContent":["import { Event, Color, Property, createPropertyDescriptor, Material, defined } from 'cesium';\nimport img from './assets/colors2.png';\n\nclass PolylineTrailMaterialProperty {\n constructor(option = {}) {\n this._definitionChanged = new Event();\n this._color = undefined;\n this._colorSubscription = undefined;\n this._time = new Date().getTime();\n\n this.color = option.color ? option.color : Color.fromCssColorString('rgba(90, 90, 255, 1)');\n this.duration = option.duration ? option.duration : 5000;\n this.trailImage = option.trailImage ? option.trailImage : img;\n\n // 类型(会自动加载到 cesium 中)\n this.type = option.type ? option.type : 'PolylineTrail';\n\n // 着色器\n this.source = option.source\n ? option.source\n : `\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture2D(image, vec2(fract(st.s - time), st.t));\n material.alpha = colorImage.a * color.a;\n material.diffuse = (colorImage.rgb+color.rgb)/2.0;\n return material;\n }\n `;\n this.addMaterial();\n }\n\n getType() {\n return 'PolylineTrail';\n }\n\n getValue(time, result) {\n let _result = result;\n if (!defined(_result)) {\n _result = {};\n }\n\n _result.color = Property.getValueOrClonedDefault(\n this._color,\n time,\n Color.WHITE,\n _result.color,\n );\n _result.image = this.trailImage;\n _result.time = ((new Date().getTime() - this._time) % this.duration) / this.duration;\n\n return _result;\n }\n\n equals(other) {\n return (\n this === other ||\n (other instanceof PolylineTrailMaterialProperty &&\n Property.equals(this._color, other._color))\n );\n }\n\n addMaterial() {\n Material._materialCache.addMaterial(this.type, {\n fabric: {\n type: this.type,\n uniforms: {\n color: new Color(1.0, 0.0, 0.0, 0.5),\n image: this.trailImage,\n time: 100,\n },\n source: this.source,\n },\n\n translucent: () => {\n return true;\n },\n });\n\n // 注意 defineProperties 会报错,需要改为 Object\n Object.defineProperties(PolylineTrailMaterialProperty.prototype, {\n isConstant: {\n get: () => {\n return false;\n },\n configurable: true,\n },\n definitionChanged: {\n get: () => {\n return this._definitionChanged;\n },\n configurable: true,\n },\n color: {\n value: createPropertyDescriptor('color'),\n configurable: true,\n writable: true,\n },\n });\n }\n}\n\nexport default PolylineTrailMaterialProperty;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG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6BAA6B,CAAChC,SAAS,EAAE;QAC7DuE,UAAU,EAAE;UACRC,GAAG,EAAE,SAAAA,IAAA,EAAM;YACP,OAAO,KAAK;UAChB,CAAC;UACD5D,YAAY,EAAE;QAClB,CAAC;QACD6D,iBAAiB,EAAE;UACfD,GAAG,EAAE,SAAAA,IAAA,EAAM;YACP,OAAOR,KAAI,CAAC7B,kBAAkB;UAClC,CAAC;UACDvB,YAAY,EAAE;QAClB,CAAC;QACD8B,KAAK,EAAE;UACHS,KAAK,EAAE,IAAAuB,gCAAwB,EAAC,OAAO,CAAC;UACxC9D,YAAY,EAAE,IAAI;UAClBC,QAAQ,EAAE;QACd;MACJ,CAAC,CAAC;IACN;EAAC;EAAA,OAAAmB,6BAAA;AAAA;AAAA,IAAA2C,QAAA,GAGU3C,6BAA6B;AAAA4C,OAAA,cAAAD,QAAA"}
@@ -1,208 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _cesium = require("cesium");
8
- 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); }
9
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
- 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); } }
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- 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); }
14
- var TilesBuilding = /*#__PURE__*/function () {
15
- function TilesBuilding(options) {
16
- _classCallCheck(this, TilesBuilding);
17
- var url = options.url || "http://183.129.170.220:10301/geoserver/www/laiyang/jianzhu/tileset.json";
18
- this.viewer = options.viewer;
19
- this.tiles = this.load(url);
20
- this.show = options.show || true;
21
- if (options.visibleHeight) {
22
- this.setVisibleByHeight(options.visibleHeight);
23
- }
24
- if (options.style) {
25
- this.render(options.style);
26
- }
27
- }
28
- _createClass(TilesBuilding, [{
29
- key: "show",
30
- set: function set(val) {
31
- this.tiles.show = val;
32
- }
33
- }, {
34
- key: "load",
35
- value: function load(url) {
36
- var viewer = this.viewer;
37
- return viewer.scene.primitives.add(new _cesium.Cesium3DTileset({
38
- url: url,
39
- modelMatrix: _cesium.Matrix4.fromArray([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
40
- maximumMemoryUsage: 100,
41
- //不可设置太高,目标机子空闲内存值以内,防止浏览器过于卡
42
- maximumScreenSpaceError: 50,
43
- //用于驱动细节细化级别的最大屏幕空间错误;较高的值可提供更好的性能,但视觉质量较低。
44
- preferLeaves: true,
45
- shadows: false,
46
- //是否显示阴影
47
- skipLevelOfDetail: true,
48
- baseScreenSpaceError: 1024,
49
- skipScreenSpaceErrorFactor: 16,
50
- skipLevels: 1,
51
- immediatelyLoadDesiredLevelOfDetail: false,
52
- loadSiblings: false,
53
- cullWithChildrenBounds: true,
54
- dynamicScreenSpaceError: true,
55
- dynamicScreenSpaceErrorDensity: 0.00278,
56
- dynamicScreenSpaceErrorFactor: 4.0,
57
- dynamicScreenSpaceErrorHeightFalloff: 0.25
58
- }));
59
- }
60
- }, {
61
- key: "setVisibleByHeight",
62
- value: function setVisibleByHeight(height) {
63
- var _this = this;
64
- var viewer = this.viewer;
65
- viewer.build3DTilesVisible = function () {
66
- // 当前高度
67
- var currentHeight = viewer.camera.positionCartographic.height;
68
- _this.show = currentHeight <= height;
69
- };
70
- }
71
- }, {
72
- key: "render",
73
- value: function render(type, color) {
74
- this.tiles.style = null;
75
- if (type === 'blue') {
76
- this.renderBlueBuild();
77
- } else if (type === 'type') {
78
- // this.clearBlueBuildStyle();
79
- this.renderType();
80
- } else if (type === 'height') {
81
- this.clearBlueBuildStyle();
82
- this.renderHeight();
83
- } else {
84
- this.clearBlueBuildStyle();
85
- this.renderCustom(color);
86
- }
87
- }
88
- }, {
89
- key: "clearBlueBuildStyle",
90
- value: function clearBlueBuildStyle() {
91
- this.tiles.readyPromise.then(function (tiles) {
92
- tiles.tileVisible.addEventListener(function (tile) {
93
- var content = tile.content;
94
- var featuresLength = content.featuresLength;
95
- var _loop = function _loop() {
96
- var feature = content.getFeature(i);
97
- var model = feature.content._model;
98
- if (model && model._sourcePrograms && model._rendererResources) {
99
- Object.keys(model._sourcePrograms).forEach(function (key) {
100
- var program = model._sourcePrograms[key];
101
- var fragmentShader = model._rendererResources.sourceShaders[program.fragmentShader];
102
- var v_position = '';
103
- if (fragmentShader.indexOf(' v_positionEC;') !== -1) {
104
- v_position = 'v_positionEC';
105
- } else if (fragmentShader.indexOf(' v_pos;') !== -1) {
106
- v_position = 'v_pos';
107
- }
108
- var color = "vec4(".concat(feature.color.toString(), ")");
109
- model._rendererResources.sourceShaders[program.fragmentShader] = "varying vec3 ".concat(v_position, ";\n void main(void) {\n vec4 position = czm_inverseModelView * vec4(").concat(v_position, ", 1);\n gl_FragColor = ").concat(color, ";\n gl_FragColor *= vec4(vec3(position.y / 120.0), 3);\n }");
110
- });
111
- model._shouldRegenerateShaders = true;
112
- }
113
- };
114
- for (var i = 0; i < featuresLength; i += 2) {
115
- _loop();
116
- }
117
- });
118
- });
119
- }
120
- }, {
121
- key: "renderBlueBuild",
122
- value: function renderBlueBuild() {
123
- this.tiles.readyPromise.then(function (tiles) {
124
- tiles.tileVisible.addEventListener(function (tile) {
125
- var content = tile.content;
126
- var featuresLength = content.featuresLength;
127
- var _loop2 = function _loop2() {
128
- var feature = content.getFeature(i);
129
- var model = feature.content._model;
130
- if (model && model._sourcePrograms && model._rendererResources) {
131
- Object.keys(model._sourcePrograms).forEach(function (key) {
132
- var program = model._sourcePrograms[key];
133
- var fragmentShader = model._rendererResources.sourceShaders[program.fragmentShader];
134
- var v_position = '';
135
- if (fragmentShader.indexOf(' v_positionEC;') !== -1) {
136
- v_position = 'v_positionEC';
137
- } else if (fragmentShader.indexOf(' v_pos;') !== -1) {
138
- v_position = 'v_pos';
139
- }
140
- var color = "vec4(".concat(feature.color.toString(), ")");
141
- model._rendererResources.sourceShaders[program.fragmentShader] = "varying vec3 ".concat(v_position, ";\n void main(void) {\n vec4 position = czm_inverseModelView * vec4(").concat(v_position, ", 1);\n float glowRange = 360.0;\n gl_FragColor = ").concat(color, ";\n gl_FragColor = vec4(0.2, 0.8, 1.0, 0.5);\n gl_FragColor *= vec4(vec3(position.y / 140.0), 3);\n }");
142
- });
143
- model._shouldRegenerateShaders = true;
144
- }
145
- };
146
- for (var i = 0; i < featuresLength; i += 2) {
147
- _loop2();
148
- }
149
- });
150
- });
151
- }
152
- }, {
153
- key: "renderType",
154
- value: function renderType() {
155
- this.tiles.readyPromise.then(function (tiles) {
156
- tiles.tileVisible.addEventListener(function (tile) {
157
- var content = tile.content;
158
- var featuresLength = content.featuresLength;
159
- var _loop3 = function _loop3() {
160
- var feature = content.getFeature(i);
161
- var model = feature.content._model;
162
- if (model && model._sourcePrograms && model._rendererResources) {
163
- Object.keys(model._sourcePrograms).forEach(function (key) {
164
- var program = model._sourcePrograms[key];
165
- var fragmentShader = model._rendererResources.sourceShaders[program.fragmentShader];
166
- var v_position = '';
167
- if (fragmentShader.indexOf(' v_positionEC;') !== -1) {
168
- v_position = 'v_positionEC';
169
- } else if (fragmentShader.indexOf(' v_pos;') !== -1) {
170
- v_position = 'v_pos';
171
- }
172
- var color = "vec4(".concat(feature.color.toString(), ")");
173
- model._rendererResources.sourceShaders[program.fragmentShader] = "varying vec3 ".concat(v_position, ";\n void main(void) {\n vec4 position = czm_inverseModelView * vec4(").concat(v_position, ", 1);\n gl_FragColor = ").concat(color, ";\n gl_FragColor = vec4(0.25, 0.69, 0.56, 1);\n gl_FragColor *= vec4(vec3(position.y / 150.0), 3);\n }");
174
- });
175
- model._shouldRegenerateShaders = true;
176
- }
177
- };
178
- for (var i = 0; i < featuresLength; i += 2) {
179
- _loop3();
180
- }
181
- });
182
- });
183
- }
184
- }, {
185
- key: "renderHeight",
186
- value: function renderHeight() {
187
- this.tiles.style = new _cesium.Cesium3DTileStyle({
188
- color: {
189
- conditions: [['${height} < 20', 'rgb(255, 237, 160)'], ['${height} >= 25 && ${height} < 30', 'rgb(254, 217, 118)'], ['${height} >= 30 && ${height} < 35', 'rgb(254, 178, 76)'], ['${height} >= 35 && ${height} < 40', 'rgb(253, 141, 60)'], ['${height} >= 40', 'rgb(252, 78, 42)']]
190
- }
191
- });
192
- }
193
- }, {
194
- key: "renderCustom",
195
- value: function renderCustom(color) {
196
- if (color) {
197
- this.tiles.style = new _cesium.Cesium3DTileStyle({
198
- color: {
199
- conditions: [['${height} > 0', "color(\"".concat(color, "\")")]]
200
- }
201
- });
202
- }
203
- }
204
- }]);
205
- return TilesBuilding;
206
- }();
207
- exports["default"] = TilesBuilding;
208
- //# sourceMappingURL=TilesBuilding.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TilesBuilding.js","names":["_cesium","require","_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","call","Number","TilesBuilding","options","url","viewer","tiles","load","show","visibleHeight","setVisibleByHeight","style","render","set","val","value","scene","primitives","add","Cesium3DTileset","modelMatrix","Matrix4","fromArray","maximumMemoryUsage","maximumScreenSpaceError","preferLeaves","shadows","skipLevelOfDetail","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","cullWithChildrenBounds","dynamicScreenSpaceError","dynamicScreenSpaceErrorDensity","dynamicScreenSpaceErrorFactor","dynamicScreenSpaceErrorHeightFalloff","height","_this","build3DTilesVisible","currentHeight","camera","positionCartographic","type","color","renderBlueBuild","renderType","clearBlueBuildStyle","renderHeight","renderCustom","readyPromise","then","tileVisible","addEventListener","tile","content","featuresLength","_loop","feature","getFeature","model","_model","_sourcePrograms","_rendererResources","keys","forEach","program","fragmentShader","sourceShaders","v_position","indexOf","concat","toString","_shouldRegenerateShaders","_loop2","_loop3","Cesium3DTileStyle","conditions","exports"],"sources":["map/material/TilesBuilding.js"],"sourcesContent":["import { Cesium3DTileset, Matrix4, Cesium3DTileStyle } from 'cesium';\n\nexport default class TilesBuilding {\n constructor(options) {\n const url =\n options.url ||\n `http://183.129.170.220:10301/geoserver/www/laiyang/jianzhu/tileset.json`;\n this.viewer = options.viewer;\n this.tiles = this.load(url);\n\n this.show = options.show || true;\n\n if (options.visibleHeight) {\n this.setVisibleByHeight(options.visibleHeight);\n }\n\n if (options.style) {\n this.render(options.style);\n }\n }\n\n set show(val) {\n this.tiles.show = val;\n }\n\n load(url) {\n const viewer = this.viewer;\n return viewer.scene.primitives.add(\n new Cesium3DTileset({\n url,\n modelMatrix: Matrix4.fromArray([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),\n maximumMemoryUsage: 100, //不可设置太高,目标机子空闲内存值以内,防止浏览器过于卡\n maximumScreenSpaceError: 50, //用于驱动细节细化级别的最大屏幕空间错误;较高的值可提供更好的性能,但视觉质量较低。\n preferLeaves: true,\n shadows: false, //是否显示阴影\n skipLevelOfDetail: true,\n baseScreenSpaceError: 1024,\n skipScreenSpaceErrorFactor: 16,\n skipLevels: 1,\n immediatelyLoadDesiredLevelOfDetail: false,\n loadSiblings: false,\n cullWithChildrenBounds: true,\n dynamicScreenSpaceError: true,\n dynamicScreenSpaceErrorDensity: 0.00278,\n dynamicScreenSpaceErrorFactor: 4.0,\n dynamicScreenSpaceErrorHeightFalloff: 0.25,\n }),\n );\n }\n\n setVisibleByHeight(height) {\n const _this = this;\n const { viewer } = this;\n viewer.build3DTilesVisible = function() {\n // 当前高度\n let currentHeight = viewer.camera.positionCartographic.height;\n\n _this.show = currentHeight <= height;\n };\n }\n\n render(type, color) {\n this.tiles.style = null;\n\n if (type === 'blue') {\n this.renderBlueBuild();\n } else if (type === 'type') {\n // this.clearBlueBuildStyle();\n this.renderType();\n } else if (type === 'height') {\n this.clearBlueBuildStyle();\n this.renderHeight();\n } else {\n this.clearBlueBuildStyle();\n this.renderCustom(color);\n }\n }\n\n clearBlueBuildStyle() {\n this.tiles.readyPromise.then(function(tiles) {\n tiles.tileVisible.addEventListener(tile => {\n let content = tile.content;\n let featuresLength = content.featuresLength;\n for (let i = 0; i < featuresLength; i += 2) {\n let feature = content.getFeature(i);\n\n let model = feature.content._model;\n\n if (model && model._sourcePrograms && model._rendererResources) {\n Object.keys(model._sourcePrograms).forEach(key => {\n let program = model._sourcePrograms[key];\n let fragmentShader =\n model._rendererResources.sourceShaders[program.fragmentShader];\n let v_position = '';\n if (fragmentShader.indexOf(' v_positionEC;') !== -1) {\n v_position = 'v_positionEC';\n } else if (fragmentShader.indexOf(' v_pos;') !== -1) {\n v_position = 'v_pos';\n }\n const color = `vec4(${feature.color.toString()})`;\n model._rendererResources.sourceShaders[\n program.fragmentShader\n ] = `varying vec3 ${v_position};\n void main(void) {\n vec4 position = czm_inverseModelView * vec4(${v_position}, 1);\n gl_FragColor = ${color};\n gl_FragColor *= vec4(vec3(position.y / 120.0), 3);\n }`;\n });\n model._shouldRegenerateShaders = true;\n }\n }\n });\n });\n }\n\n renderBlueBuild() {\n this.tiles.readyPromise.then(function(tiles) {\n tiles.tileVisible.addEventListener(tile => {\n let content = tile.content;\n let featuresLength = content.featuresLength;\n for (let i = 0; i < featuresLength; i += 2) {\n let feature = content.getFeature(i);\n\n let model = feature.content._model;\n\n if (model && model._sourcePrograms && model._rendererResources) {\n Object.keys(model._sourcePrograms).forEach(key => {\n let program = model._sourcePrograms[key];\n let fragmentShader =\n model._rendererResources.sourceShaders[program.fragmentShader];\n let v_position = '';\n if (fragmentShader.indexOf(' v_positionEC;') !== -1) {\n v_position = 'v_positionEC';\n } else if (fragmentShader.indexOf(' v_pos;') !== -1) {\n v_position = 'v_pos';\n }\n const color = `vec4(${feature.color.toString()})`;\n model._rendererResources.sourceShaders[\n program.fragmentShader\n ] = `varying vec3 ${v_position};\n void main(void) {\n vec4 position = czm_inverseModelView * vec4(${v_position}, 1);\n float glowRange = 360.0;\n gl_FragColor = ${color};\n gl_FragColor = vec4(0.2, 0.8, 1.0, 0.5);\n gl_FragColor *= vec4(vec3(position.y / 140.0), 3);\n }`;\n });\n model._shouldRegenerateShaders = true;\n }\n }\n });\n });\n }\n\n renderType() {\n this.tiles.readyPromise.then(function(tiles) {\n tiles.tileVisible.addEventListener(tile => {\n let content = tile.content;\n let featuresLength = content.featuresLength;\n for (let i = 0; i < featuresLength; i += 2) {\n let feature = content.getFeature(i);\n\n let model = feature.content._model;\n\n if (model && model._sourcePrograms && model._rendererResources) {\n Object.keys(model._sourcePrograms).forEach(key => {\n let program = model._sourcePrograms[key];\n let fragmentShader =\n model._rendererResources.sourceShaders[program.fragmentShader];\n let v_position = '';\n if (fragmentShader.indexOf(' v_positionEC;') !== -1) {\n v_position = 'v_positionEC';\n } else if (fragmentShader.indexOf(' v_pos;') !== -1) {\n v_position = 'v_pos';\n }\n const color = `vec4(${feature.color.toString()})`;\n model._rendererResources.sourceShaders[\n program.fragmentShader\n ] = `varying vec3 ${v_position};\n void main(void) {\n vec4 position = czm_inverseModelView * vec4(${v_position}, 1);\n gl_FragColor = ${color};\n gl_FragColor = vec4(0.25, 0.69, 0.56, 1);\n gl_FragColor *= vec4(vec3(position.y / 150.0), 3);\n }`;\n });\n model._shouldRegenerateShaders = true;\n }\n }\n });\n });\n }\n\n renderHeight() {\n this.tiles.style = new Cesium3DTileStyle({\n color: {\n conditions: [\n ['${height} < 20', 'rgb(255, 237, 160)'],\n ['${height} >= 25 && ${height} < 30', 'rgb(254, 217, 118)'],\n ['${height} >= 30 && ${height} < 35', 'rgb(254, 178, 76)'],\n ['${height} >= 35 && ${height} < 40', 'rgb(253, 141, 60)'],\n ['${height} >= 40', 'rgb(252, 78, 42)'],\n ],\n },\n });\n }\n\n renderCustom(color) {\n if (color) {\n this.tiles.style = new Cesium3DTileStyle({\n color: {\n conditions: [['${height} > 0', `color(\"${color}\")`]],\n },\n });\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAqE,SAAAC,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAAA,SAAAK,gBAAAC,QAAA,EAAAC,WAAA,UAAAD,QAAA,YAAAC,WAAA,eAAAC,SAAA;AAAA,SAAAC,kBAAAC,MAAA,EAAAC,KAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAD,KAAA,CAAAE,MAAA,EAAAD,CAAA,UAAAE,UAAA,GAAAH,KAAA,CAAAC,CAAA,GAAAE,UAAA,CAAAC,UAAA,GAAAD,UAAA,CAAAC,UAAA,WAAAD,UAAA,CAAAE,YAAA,wBAAAF,UAAA,EAAAA,UAAA,CAAAG,QAAA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AA3C,aAAA;AAAA;AAAA6E,OAAA,cAAA7E,aAAA"}
Binary file
Binary file
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _ODLineLayer = _interopRequireDefault(require("./ODLineLayer"));
8
- var _PolylineTrailLinkMaterialProperty = _interopRequireDefault(require("./PolylineTrailLinkMaterialProperty"));
9
- var _PolylineTrailMaterialProperty = _interopRequireDefault(require("./PolylineTrailMaterialProperty"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- var _default = {
12
- ODLineLayer: _ODLineLayer["default"],
13
- PolylineTrailLinkMaterialProperty: _PolylineTrailLinkMaterialProperty["default"],
14
- PolylineTrailMaterialProperty: _PolylineTrailMaterialProperty["default"]
15
- };
16
- exports["default"] = _default;
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_ODLineLayer","_interopRequireDefault","require","_PolylineTrailLinkMaterialProperty","_PolylineTrailMaterialProperty","obj","__esModule","_default","ODLineLayer","PolylineTrailLinkMaterialProperty","PolylineTrailMaterialProperty","exports"],"sources":["map/material/index.js"],"sourcesContent":["import ODLineLayer from './ODLineLayer';\nimport PolylineTrailLinkMaterialProperty from './PolylineTrailLinkMaterialProperty';\nimport PolylineTrailMaterialProperty from './PolylineTrailMaterialProperty';\n\nexport default {\n ODLineLayer,\n PolylineTrailLinkMaterialProperty,\n PolylineTrailMaterialProperty,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kCAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,8BAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA4E,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,IAAAE,QAAA,GAE7D;EACXC,WAAW,EAAXA,uBAAW;EACXC,iCAAiC,EAAjCA,6CAAiC;EACjCC,6BAA6B,EAA7BA;AACJ,CAAC;AAAAC,OAAA,cAAAJ,QAAA"}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- require("./index.css");
4
- //# sourceMappingURL=css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"css.js","names":["require"],"sources":["map/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA"}
@@ -1,155 +0,0 @@
1
- .map-container {
2
- width: 100%;
3
- height: 100%;
4
- position: relative;
5
- }
6
- .map-container .map {
7
- width: 100%;
8
- height: 100%;
9
- position: relative;
10
- overflow: hidden;
11
- }
12
- .map-container .map .cesium-viewer-bottom {
13
- display: none;
14
- }
15
- .map-container .map .cesium-performanceDisplay-defaultContainer {
16
- top: 100px;
17
- }
18
- .map-container .map .map-dark {
19
- -webkit-filter: sepia(100%) hue-rotate(-25deg) invert(100%);
20
- filter: sepia(100%) hue-rotate(-25deg) invert(100%);
21
- }
22
- .map-container .map .map-dark-label {
23
- -webkit-filter: sepia(10%) hue-rotate(-10deg) invert(80%);
24
- filter: sepia(10%) hue-rotate(-10deg) invert(80%);
25
- }
26
- .map-container .map .custom-tip {
27
- position: absolute;
28
- z-index: 2;
29
- padding: 2px 6px;
30
- background: rgba(0, 0, 0, 0.5);
31
- color: #ffffff;
32
- font-size: 14px;
33
- border-radius: 4px;
34
- }
35
- .map-container .map .point_animation {
36
- height: 65px;
37
- width: 65px;
38
- margin-bottom: 4px;
39
- border-radius: 40px;
40
- background: #0080ff;
41
- -webkit-transform: scale(0);
42
- -ms-transform: scale(0);
43
- transform: scale(0);
44
- -webkit-animation: point 2s;
45
- animation: point 2s;
46
- -webkit-animation-iteration-count: infinite;
47
- animation-iteration-count: infinite;
48
- -webkit-animation-timing-function: linear;
49
- animation-timing-function: linear;
50
- pointer-events: none;
51
- }
52
- @-webkit-keyframes point {
53
- to {
54
- -webkit-transform: scale(0.8, 0.3);
55
- transform: scale(0.8, 0.3);
56
- background: rgba(0, 0, 0, 0);
57
- }
58
- }
59
- @keyframes point {
60
- to {
61
- -webkit-transform: scale(0.8, 0.3);
62
- transform: scale(0.8, 0.3);
63
- background: rgba(0, 0, 0, 0);
64
- }
65
- }
66
- .map-container .cesium-popup {
67
- position: absolute;
68
- -webkit-transform: translateX(-50%);
69
- -ms-transform: translateX(-50%);
70
- transform: translateX(-50%);
71
- min-width: 220px;
72
- max-width: 300px;
73
- background: rgba(0, 35, 65, 0.9);
74
- -webkit-box-shadow: 0 0 10px rgba(1, 211, 252, 0.75) inset;
75
- box-shadow: 0 0 10px rgba(1, 211, 252, 0.75) inset;
76
- border-radius: 10px;
77
- color: #fff;
78
- z-index: -1;
79
- opacity: 0;
80
- }
81
- .map-container .cesium-popup .cesium-popup-title {
82
- font-size: 14px;
83
- font-weight: bold;
84
- padding: 10px 50px 10px 12px;
85
- white-space: nowrap;
86
- text-overflow: ellipsis;
87
- overflow: hidden;
88
- background: rgba(101, 211, 252, 0.2);
89
- border-radius: 6px 6px 0 0;
90
- color: #fff;
91
- }
92
- .map-container .cesium-popup .cesium-popup-no-title {
93
- border-bottom: 0 !important;
94
- }
95
- .map-container .cesium-popup .cesium-popup-content {
96
- padding: 10px 12px;
97
- }
98
- .map-container .cesium-popup .cesium-popup-close {
99
- text-decoration: none;
100
- position: absolute;
101
- top: 12px;
102
- right: 8px;
103
- cursor: pointer;
104
- font-size: 16px;
105
- font-weight: bold;
106
- color: #fff;
107
- }
108
- .map-container .cesium-popup::after,
109
- .map-container .cesium-popup::before {
110
- top: 100%;
111
- border: solid transparent;
112
- content: ' ';
113
- height: 0;
114
- width: 0;
115
- position: absolute;
116
- pointer-events: none;
117
- }
118
- .map-container .cesium-popup::after {
119
- border-top-color: #2c69a6;
120
- border-width: 5px;
121
- left: 50%;
122
- -webkit-transform: translateX(calc(-50%));
123
- -ms-transform: translateX(calc(-50%));
124
- transform: translateX(calc(-50%));
125
- }
126
- .map-container .cesium-popup::before {
127
- border-top-color: rgba(2, 24, 45, 0.92);
128
- border-width: 5px;
129
- left: 50%;
130
- -webkit-transform: translateX(calc(-50%));
131
- -ms-transform: translateX(calc(-50%));
132
- transform: translateX(calc(-50%));
133
- }
134
- .map-container .cesium-template {
135
- background-color: #1890ff;
136
- color: #ffffff;
137
- padding: 5px 10px;
138
- -webkit-box-sizing: border-box;
139
- box-sizing: border-box;
140
- min-height: 50px;
141
- }
142
- .cesium-popup-abnormal {
143
- background: rgba(75, 15, 15, 0.9);
144
- -webkit-box-shadow: 0 0 3rem rgba(228, 53, 40, 0.75) inset;
145
- box-shadow: 0 0 3rem rgba(228, 53, 40, 0.75) inset;
146
- }
147
- .cesium-popup-abnormal .title {
148
- background: rgba(255, 193, 191, 0.2);
149
- }
150
- .cesium-popup-abnormal::after {
151
- border-top-color: rgba(228, 53, 40, 0.5);
152
- }
153
- .cesium-popup-abnormal::before {
154
- border-top-color: rgba(75, 15, 15, 0.92);
155
- }
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- require("./index.less");
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["require"],"sources":["map/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA"}