@vtx/cs-map 1.0.38 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_util/EventEmitter.js +79 -0
- package/lib/_util/EventEmitter.js.map +1 -0
- package/lib/_util/Provider.js +12 -0
- package/lib/_util/Provider.js.map +1 -0
- package/lib/_util/filterSpecialCharacters.js +90 -0
- package/lib/_util/filterSpecialCharacters.js.map +1 -0
- package/lib/_util/generateRandomPosition.js +24 -0
- package/lib/_util/generateRandomPosition.js.map +1 -0
- package/lib/_util/getBBoxFromGeojson.js +65 -0
- package/lib/_util/getBBoxFromGeojson.js.map +1 -0
- package/lib/_util/getComponentProps.js +14 -0
- package/lib/_util/getComponentProps.js.map +1 -0
- package/lib/_util/getCookie.js +24 -0
- package/lib/_util/getCookie.js.map +1 -0
- package/lib/_util/getDefaultMapInfo.js +33 -0
- package/lib/_util/getDefaultMapInfo.js.map +1 -0
- package/lib/_util/getSystemInfo.js +26 -0
- package/lib/_util/getSystemInfo.js.map +1 -0
- package/lib/_util/getToken.js +13 -0
- package/lib/_util/getToken.js.map +1 -0
- package/lib/_util/getUrlParam.js +15 -0
- package/lib/_util/getUrlParam.js.map +1 -0
- package/lib/_util/http.js +186 -0
- package/lib/_util/http.js.map +1 -0
- package/lib/_util/isFunction.js +10 -0
- package/lib/_util/isFunction.js.map +1 -0
- package/lib/_util/isObject.js +10 -0
- package/lib/_util/isObject.js.map +1 -0
- package/lib/_util/layer.js +134 -0
- package/lib/_util/layer.js.map +1 -0
- package/lib/_util/mapTool.js +187 -0
- package/lib/_util/mapTool.js.map +1 -0
- package/lib/_util/setCookie.js +15 -0
- package/lib/_util/setCookie.js.map +1 -0
- package/lib/_util/transformRgb.js +33 -0
- package/lib/_util/transformRgb.js.map +1 -0
- package/lib/_util/useColSize.js +28 -0
- package/lib/_util/useColSize.js.map +1 -0
- package/lib/_util/useInterval.js +19 -0
- package/lib/_util/useInterval.js.map +1 -0
- package/lib/_util/useProps.js +14 -0
- package/lib/_util/useProps.js.map +1 -0
- package/lib/_util/useSet.js +44 -0
- package/lib/_util/useSet.js.map +1 -0
- package/lib/assets/base-img-1.png +0 -0
- package/lib/assets/base-img-2.png +0 -0
- package/lib/assets/base-img-3.png +0 -0
- package/lib/assets/base-img-4.png +0 -0
- package/lib/assets/base-img-5.png +0 -0
- package/lib/assets/base-img.png +0 -0
- package/lib/assets/bz.png +0 -0
- package/lib/assets/colors.png +0 -0
- package/lib/assets/colors1.png +0 -0
- package/lib/assets/ll.png +0 -0
- package/lib/assets/people.gif +0 -0
- package/lib/assets/sw.png +0 -0
- package/lib/assets/water.png +0 -0
- package/lib/assets/yl.png +0 -0
- package/lib/cesium-tiles-layer/CesiumTilesLayer.js +56 -0
- package/lib/cesium-tiles-layer/CesiumTilesLayer.js.map +1 -0
- package/lib/cesium-tiles-layer/index.js +73 -0
- package/lib/cesium-tiles-layer/index.js.map +1 -0
- package/lib/cesium-tiles-layer/style/css.js +4 -0
- package/lib/cesium-tiles-layer/style/css.js.map +1 -0
- package/lib/cesium-tiles-layer/style/index.css +0 -0
- package/lib/cesium-tiles-layer/style/index.js +4 -0
- package/lib/cesium-tiles-layer/style/index.js.map +1 -0
- package/lib/cesium-tiles-layer/style/index.less +0 -0
- package/lib/circle/circle.js +67 -0
- package/lib/circle/circle.js.map +1 -0
- package/lib/circle/index.js +49 -0
- package/lib/circle/index.js.map +1 -0
- package/lib/circle/style/css.js +2 -0
- package/lib/circle/style/css.js.map +1 -0
- package/lib/circle/style/index.js +2 -0
- package/lib/circle/style/index.js.map +1 -0
- package/lib/config.js +12 -0
- package/lib/config.js.map +1 -0
- package/lib/demand-layer/DemandLayer.js +409 -0
- package/lib/demand-layer/DemandLayer.js.map +1 -0
- package/lib/demand-layer/index.js +104 -0
- package/lib/demand-layer/index.js.map +1 -0
- package/lib/demand-layer/style/css.js +4 -0
- package/lib/demand-layer/style/css.js.map +1 -0
- package/lib/demand-layer/style/index.css +0 -0
- package/lib/demand-layer/style/index.js +4 -0
- package/lib/demand-layer/style/index.js.map +1 -0
- package/lib/demand-layer/style/index.less +0 -0
- package/lib/events/index.js +27 -0
- package/lib/events/index.js.map +1 -0
- package/lib/feature-layer/FeatureLayer.js +458 -0
- package/lib/feature-layer/FeatureLayer.js.map +1 -0
- package/lib/feature-layer/createFeatureCollection.js +127 -0
- package/lib/feature-layer/createFeatureCollection.js.map +1 -0
- package/lib/feature-layer/index.js +115 -0
- package/lib/feature-layer/index.js.map +1 -0
- package/lib/feature-layer/style/css.js +4 -0
- package/lib/feature-layer/style/css.js.map +1 -0
- package/lib/feature-layer/style/index.css +0 -0
- package/lib/feature-layer/style/index.js +4 -0
- package/lib/feature-layer/style/index.js.map +1 -0
- package/lib/feature-layer/style/index.less +0 -0
- package/lib/fly-line-layer/FlyLineLayer.js +259 -0
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -0
- package/lib/fly-line-layer/index.js +90 -0
- package/lib/fly-line-layer/index.js.map +1 -0
- package/lib/fly-line-layer/lineFlowMaterialProperty.js +89 -0
- package/lib/fly-line-layer/lineFlowMaterialProperty.js.map +1 -0
- package/lib/fly-line-layer/style/css.js +4 -0
- package/lib/fly-line-layer/style/css.js.map +1 -0
- package/lib/fly-line-layer/style/index.css +0 -0
- package/lib/fly-line-layer/style/index.js +4 -0
- package/lib/fly-line-layer/style/index.js.map +1 -0
- package/lib/fly-line-layer/style/index.less +0 -0
- package/lib/gif-dom-layer/GifDomLayer.js +104 -0
- package/lib/gif-dom-layer/GifDomLayer.js.map +1 -0
- package/lib/gif-dom-layer/index.js +44 -0
- package/lib/gif-dom-layer/index.js.map +1 -0
- package/lib/gif-dom-layer/style/css.js +4 -0
- package/lib/gif-dom-layer/style/css.js.map +1 -0
- package/lib/gif-dom-layer/style/index.css +0 -0
- package/lib/gif-dom-layer/style/index.js +4 -0
- package/lib/gif-dom-layer/style/index.js.map +1 -0
- package/lib/gif-dom-layer/style/index.less +0 -0
- package/lib/gradation-line-layer/GradationLineLayer.js +103 -0
- package/lib/gradation-line-layer/GradationLineLayer.js.map +1 -0
- package/lib/gradation-line-layer/index.js +83 -0
- package/lib/gradation-line-layer/index.js.map +1 -0
- package/lib/gradation-line-layer/style/css.js +4 -0
- package/lib/gradation-line-layer/style/css.js.map +1 -0
- package/lib/gradation-line-layer/style/index.css +0 -0
- package/lib/gradation-line-layer/style/index.js +4 -0
- package/lib/gradation-line-layer/style/index.js.map +1 -0
- package/lib/gradation-line-layer/style/index.less +0 -0
- package/lib/group-layer/GroupLayer.js +131 -0
- package/lib/group-layer/GroupLayer.js.map +1 -0
- package/lib/group-layer/index.js +71 -0
- package/lib/group-layer/index.js.map +1 -0
- package/lib/group-layer/style/css.js +4 -0
- package/lib/group-layer/style/css.js.map +1 -0
- package/lib/group-layer/style/index.css +0 -0
- package/lib/group-layer/style/index.js +4 -0
- package/lib/group-layer/style/index.js.map +1 -0
- package/lib/group-layer/style/index.less +0 -0
- package/lib/heatmap-layer/CesiumHeatmap.js +445 -0
- package/lib/heatmap-layer/CesiumHeatmap.js.map +1 -0
- package/lib/heatmap-layer/HeatmapLayer.js +157 -0
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -0
- package/lib/heatmap-layer/heatmap.js +610 -0
- package/lib/heatmap-layer/heatmap.js.map +1 -0
- package/lib/heatmap-layer/index.js +90 -0
- package/lib/heatmap-layer/index.js.map +1 -0
- package/lib/heatmap-layer/style/css.js +4 -0
- package/lib/heatmap-layer/style/css.js.map +1 -0
- package/lib/heatmap-layer/style/index.css +0 -0
- package/lib/heatmap-layer/style/index.js +4 -0
- package/lib/heatmap-layer/style/index.js.map +1 -0
- package/lib/heatmap-layer/style/index.less +0 -0
- package/lib/highlight-layer/HighlightLayer.js +261 -0
- package/lib/highlight-layer/HighlightLayer.js.map +1 -0
- package/lib/highlight-layer/index.js +25 -0
- package/lib/highlight-layer/index.js.map +1 -0
- package/lib/highlight-layer/style/css.js +4 -0
- package/lib/highlight-layer/style/css.js.map +1 -0
- package/lib/highlight-layer/style/index.css +0 -0
- package/lib/highlight-layer/style/index.js +4 -0
- package/lib/highlight-layer/style/index.js.map +1 -0
- package/lib/highlight-layer/style/index.less +0 -0
- package/lib/image-layer/ImageLayer.js +244 -0
- package/lib/image-layer/ImageLayer.js.map +1 -0
- package/lib/image-layer/index.js +134 -0
- package/lib/image-layer/index.js.map +1 -0
- package/lib/image-layer/style/css.js +4 -0
- package/lib/image-layer/style/css.js.map +1 -0
- package/lib/image-layer/style/index.css +0 -0
- package/lib/image-layer/style/index.js +4 -0
- package/lib/image-layer/style/index.js.map +1 -0
- package/lib/image-layer/style/index.less +0 -0
- package/lib/index.js +147 -0
- package/lib/index.js.map +1 -0
- package/lib/label/Label.js +74 -0
- package/lib/label/Label.js.map +1 -0
- package/lib/label/index.js +51 -0
- package/lib/label/index.js.map +1 -0
- package/lib/label/style/css.js +2 -0
- package/lib/label/style/css.js.map +1 -0
- package/lib/label/style/index.js +2 -0
- package/lib/label/style/index.js.map +1 -0
- package/lib/legend/index.js +208 -0
- package/lib/legend/index.js.map +1 -0
- package/lib/legend/style/css.js +8 -0
- package/lib/legend/style/css.js.map +1 -0
- package/lib/legend/style/index.css +60 -0
- package/lib/legend/style/index.js +8 -0
- package/lib/legend/style/index.js.map +1 -0
- package/lib/legend/style/index.less +63 -0
- package/lib/line-flow-layer/LineFlowLayer.js +104 -0
- package/lib/line-flow-layer/LineFlowLayer.js.map +1 -0
- package/lib/line-flow-layer/index.js +34 -0
- package/lib/line-flow-layer/index.js.map +1 -0
- package/lib/line-flow-layer/style/css.js +4 -0
- package/lib/line-flow-layer/style/css.js.map +1 -0
- package/lib/line-flow-layer/style/index.css +0 -0
- package/lib/line-flow-layer/style/index.js +4 -0
- package/lib/line-flow-layer/style/index.js.map +1 -0
- package/lib/line-flow-layer/style/index.less +0 -0
- package/lib/map/InfoTool/index.css +55 -0
- package/lib/map/InfoTool/index.js +246 -0
- package/lib/map/InfoTool/index.js.map +1 -0
- package/lib/map/InfoTool/index.less +46 -0
- package/lib/map/InfoTool/util.js +112 -0
- package/lib/map/InfoTool/util.js.map +1 -0
- package/lib/map/InfoWindow.js +72 -0
- package/lib/map/InfoWindow.js.map +1 -0
- package/lib/map/Layers.js +286 -0
- package/lib/map/Layers.js.map +1 -0
- package/lib/map/Popup.js +301 -0
- package/lib/map/Popup.js.map +1 -0
- package/lib/map/base/imagery/amap/AmapImageryProvider.js +46 -0
- package/lib/map/base/imagery/amap/AmapImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js +46 -0
- package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js.map +1 -0
- package/lib/map/base/imagery/baidu/BaiduImageryProvider.js +146 -0
- package/lib/map/base/imagery/baidu/BaiduImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js +377 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js.map +1 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js +121 -0
- package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js.map +1 -0
- package/lib/map/base/imagery/geoq/GeoQImageryProvider.js +48 -0
- package/lib/map/base/imagery/geoq/GeoQImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/google/GoogleImageryProvider.js +41 -0
- package/lib/map/base/imagery/google/GoogleImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/tdt/TdtImageryProvider.js +38 -0
- package/lib/map/base/imagery/tdt/TdtImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/tencent/TencentImageryProvider.js +59 -0
- package/lib/map/base/imagery/tencent/TencentImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js +46 -0
- package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js.map +1 -0
- package/lib/map/base/imagery/transform/CoordTransform.js +173 -0
- package/lib/map/base/imagery/transform/CoordTransform.js.map +1 -0
- package/lib/map/base/index.js +204 -0
- package/lib/map/base/index.js.map +1 -0
- package/lib/map/hooks/useGetMapFeatureInfoByText.js +209 -0
- package/lib/map/hooks/useGetMapFeatureInfoByText.js.map +1 -0
- package/lib/map/index.js +843 -0
- package/lib/map/index.js.map +1 -0
- package/lib/map/material/AroundPoint.js +65 -0
- package/lib/map/material/AroundPoint.js.map +1 -0
- package/lib/map/material/CircleRippleMaterialProperty.js +87 -0
- package/lib/map/material/CircleRippleMaterialProperty.js.map +1 -0
- package/lib/map/material/ODLineLayer.js +91 -0
- package/lib/map/material/ODLineLayer.js.map +1 -0
- package/lib/map/material/PolylineTrailLinkMaterialProperty.js +100 -0
- package/lib/map/material/PolylineTrailLinkMaterialProperty.js.map +1 -0
- package/lib/map/material/PolylineTrailMaterialProperty.js +101 -0
- package/lib/map/material/PolylineTrailMaterialProperty.js.map +1 -0
- package/lib/map/material/TilesBuilding.js +207 -0
- package/lib/map/material/TilesBuilding.js.map +1 -0
- package/lib/map/material/assets/colors1.png +0 -0
- package/lib/map/material/assets/colors2.png +0 -0
- package/lib/map/material/index.js +16 -0
- package/lib/map/material/index.js.map +1 -0
- package/lib/map/style/css.js +4 -0
- package/lib/map/style/css.js.map +1 -0
- package/lib/map/style/index.css +155 -0
- package/lib/map/style/index.js +4 -0
- package/lib/map/style/index.js.map +1 -0
- package/lib/map/style/index.less +149 -0
- package/lib/marker/Marker.js +112 -0
- package/lib/marker/Marker.js.map +1 -0
- package/lib/marker/index.js +49 -0
- package/lib/marker/index.js.map +1 -0
- package/lib/marker/style/css.js +2 -0
- package/lib/marker/style/css.js.map +1 -0
- package/lib/marker/style/index.js +2 -0
- package/lib/marker/style/index.js.map +1 -0
- package/lib/point/Point.js +69 -0
- package/lib/point/Point.js.map +1 -0
- package/lib/point/index.js +49 -0
- package/lib/point/index.js.map +1 -0
- package/lib/point/style/css.js +2 -0
- package/lib/point/style/css.js.map +1 -0
- package/lib/point/style/index.js +2 -0
- package/lib/point/style/index.js.map +1 -0
- package/lib/polygon/Polygon.js +67 -0
- package/lib/polygon/Polygon.js.map +1 -0
- package/lib/polygon/index.js +49 -0
- package/lib/polygon/index.js.map +1 -0
- package/lib/polygon/style/css.js +2 -0
- package/lib/polygon/style/css.js.map +1 -0
- package/lib/polygon/style/index.js +2 -0
- package/lib/polygon/style/index.js.map +1 -0
- package/lib/polyline/Polyline.js +68 -0
- package/lib/polyline/Polyline.js.map +1 -0
- package/lib/polyline/index.js +49 -0
- package/lib/polyline/index.js.map +1 -0
- package/lib/polyline/style/css.js +2 -0
- package/lib/polyline/style/css.js.map +1 -0
- package/lib/polyline/style/index.js +2 -0
- package/lib/polyline/style/index.js.map +1 -0
- package/lib/renderer/index.js +268 -0
- package/lib/renderer/index.js.map +1 -0
- package/lib/renderer/style/css.js +4 -0
- package/lib/renderer/style/css.js.map +1 -0
- package/lib/renderer/style/index.css +0 -0
- package/lib/renderer/style/index.js +4 -0
- package/lib/renderer/style/index.js.map +1 -0
- package/lib/renderer/style/index.less +0 -0
- package/lib/style/index.css +0 -0
- package/lib/style/index.less +2 -0
- package/lib/style/themes/compact.css +0 -0
- package/lib/style/themes/compact.less +1 -0
- package/lib/style/themes/dark.css +0 -0
- package/lib/style/themes/dark.less +9 -0
- package/lib/style/themes/default.css +0 -0
- package/lib/style/themes/default.less +7 -0
- package/lib/style/themes/index.css +0 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/style/themes/variable.css +0 -0
- package/lib/style/themes/variable.less +5 -0
- package/lib/tools/assets/footer.png +0 -0
- package/lib/tools/assets/layer.png +0 -0
- package/lib/tools/assets/search.png +0 -0
- package/lib/tools/base-map-switch/index.js +103 -0
- package/lib/tools/base-map-switch/index.js.map +1 -0
- package/lib/tools/dimension-switch/index.js +38 -0
- package/lib/tools/dimension-switch/index.js.map +1 -0
- package/lib/tools/index.js +49 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/layer-control/index.js +171 -0
- package/lib/tools/layer-control/index.js.map +1 -0
- package/lib/tools/map-search/Select/index.js +55 -0
- package/lib/tools/map-search/Select/index.js.map +1 -0
- package/lib/tools/map-search/Select/style/css.js +4 -0
- package/lib/tools/map-search/Select/style/css.js.map +1 -0
- package/lib/tools/map-search/Select/style/index.css +45 -0
- package/lib/tools/map-search/Select/style/index.js +4 -0
- package/lib/tools/map-search/Select/style/index.js.map +1 -0
- package/lib/tools/map-search/Select/style/index.less +47 -0
- package/lib/tools/map-search/index.js +204 -0
- package/lib/tools/map-search/index.js.map +1 -0
- package/lib/tools/style/css.js +8 -0
- package/lib/tools/style/css.js.map +1 -0
- package/lib/tools/style/index.css +208 -0
- package/lib/tools/style/index.js +8 -0
- package/lib/tools/style/index.js.map +1 -0
- package/lib/tools/style/index.less +225 -0
- package/lib/tools/tools-item/index.js +66 -0
- package/lib/tools/tools-item/index.js.map +1 -0
- package/lib/trail-polyline-layer/TrailPolylineLayer.js +81 -0
- package/lib/trail-polyline-layer/TrailPolylineLayer.js.map +1 -0
- package/lib/trail-polyline-layer/TrailPolylineMaterial.js +30 -0
- package/lib/trail-polyline-layer/TrailPolylineMaterial.js.map +1 -0
- package/lib/trail-polyline-layer/index.js +28 -0
- package/lib/trail-polyline-layer/index.js.map +1 -0
- package/lib/trail-polyline-layer/style/css.js +4 -0
- package/lib/trail-polyline-layer/style/css.js.map +1 -0
- package/lib/trail-polyline-layer/style/index.css +0 -0
- package/lib/trail-polyline-layer/style/index.js +4 -0
- package/lib/trail-polyline-layer/style/index.js.map +1 -0
- package/lib/trail-polyline-layer/style/index.less +0 -0
- package/lib/use-props/style/css.js +2 -0
- package/lib/use-props/style/css.js.map +1 -0
- package/lib/use-props/style/index.js +2 -0
- package/lib/use-props/style/index.js.map +1 -0
- package/lib/water-surface-layer/WaterSurfaceLayer.js +86 -0
- package/lib/water-surface-layer/WaterSurfaceLayer.js.map +1 -0
- package/lib/water-surface-layer/index.js +28 -0
- package/lib/water-surface-layer/index.js.map +1 -0
- package/lib/water-surface-layer/style/css.js +4 -0
- package/lib/water-surface-layer/style/css.js.map +1 -0
- package/lib/water-surface-layer/style/index.css +0 -0
- package/lib/water-surface-layer/style/index.js +4 -0
- package/lib/water-surface-layer/style/index.js.map +1 -0
- package/lib/water-surface-layer/style/index.less +0 -0
- package/lib/weather/Weather.js +174 -0
- package/lib/weather/Weather.js.map +1 -0
- package/lib/weather/index.js +36 -0
- package/lib/weather/index.js.map +1 -0
- package/lib/weather/style/css.js +8 -0
- package/lib/weather/style/css.js.map +1 -0
- package/lib/weather/style/index.css +60 -0
- package/lib/weather/style/index.js +8 -0
- package/lib/weather/style/index.js.map +1 -0
- package/lib/weather/style/index.less +63 -0
- package/package.json +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
.map-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
.map {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
position: relative;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
|
|
12
|
+
.cesium-viewer-bottom {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cesium-performanceDisplay-defaultContainer {
|
|
17
|
+
top: 100px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.map-dark {
|
|
21
|
+
filter: sepia(100%) hue-rotate(-25deg) invert(100%);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.map-dark-label {
|
|
25
|
+
filter: sepia(10%) hue-rotate(-10deg) invert(80%);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.custom-tip {
|
|
29
|
+
position: absolute;
|
|
30
|
+
z-index: 2;
|
|
31
|
+
padding: 2px 6px;
|
|
32
|
+
background: rgba(0, 0, 0, 0.5);
|
|
33
|
+
color: #ffffff;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.point_animation {
|
|
39
|
+
height: 65px;
|
|
40
|
+
width: 65px;
|
|
41
|
+
margin-bottom: 4px;
|
|
42
|
+
border-radius: 40px;
|
|
43
|
+
background: rgb(0, 128, 255, 0.8);
|
|
44
|
+
transform: scale(0);
|
|
45
|
+
animation: point 2s;
|
|
46
|
+
animation-iteration-count: infinite;
|
|
47
|
+
animation-timing-function: linear;
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes point {
|
|
52
|
+
to {
|
|
53
|
+
transform: scale(0.8, 0.3);
|
|
54
|
+
background: rgba(0, 0, 0, 0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.cesium-popup {
|
|
59
|
+
position: absolute;
|
|
60
|
+
transform: translateX(-50%);
|
|
61
|
+
min-width: 220px;
|
|
62
|
+
max-width: 300px;
|
|
63
|
+
background: rgba(0, 35, 65, 0.9);
|
|
64
|
+
box-shadow: 0 0 10px rgba(1, 211, 252, 0.75) inset;
|
|
65
|
+
border-radius: 10px;
|
|
66
|
+
color: #fff;
|
|
67
|
+
z-index: -1;
|
|
68
|
+
opacity: 0;
|
|
69
|
+
|
|
70
|
+
.cesium-popup-title {
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
font-weight: bold;
|
|
73
|
+
padding: 10px 50px 10px 12px;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
background: rgba(101, 211, 252, 0.2);
|
|
78
|
+
border-radius: 6px 6px 0 0;
|
|
79
|
+
color: #fff;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.cesium-popup-no-title {
|
|
83
|
+
border-bottom: 0 !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cesium-popup-content {
|
|
87
|
+
padding: 10px 12px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cesium-popup-close {
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: 12px;
|
|
94
|
+
right: 8px;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
font-size: 16px;
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
color: #fff;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&::after,
|
|
102
|
+
&::before {
|
|
103
|
+
top: 100%;
|
|
104
|
+
border: solid transparent;
|
|
105
|
+
content: ' ';
|
|
106
|
+
height: 0;
|
|
107
|
+
width: 0;
|
|
108
|
+
position: absolute;
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&::after {
|
|
113
|
+
border-top-color: #2c69a6;
|
|
114
|
+
border-width: 5px;
|
|
115
|
+
left: 50%;
|
|
116
|
+
transform: translateX(calc(-50%));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&::before {
|
|
120
|
+
border-top-color: rgba(2, 24, 45, 0.92);
|
|
121
|
+
border-width: 5px;
|
|
122
|
+
left: 50%;
|
|
123
|
+
transform: translateX(calc(-50%));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.cesium-template {
|
|
128
|
+
background-color: #1890ff;
|
|
129
|
+
color: #ffffff;
|
|
130
|
+
padding: 5px 10px;
|
|
131
|
+
box-sizing: border-box;
|
|
132
|
+
min-height: 50px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.cesium-popup-abnormal {
|
|
137
|
+
background: rgba(75, 15, 15, 0.9);
|
|
138
|
+
box-shadow: 0 0 3rem rgba(228, 53, 40, 0.75) inset;
|
|
139
|
+
.title {
|
|
140
|
+
background: rgba(255, 193, 191, 0.2);
|
|
141
|
+
}
|
|
142
|
+
&::after {
|
|
143
|
+
border-top-color: rgba(228, 53, 40, 0.5);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&::before {
|
|
147
|
+
border-top-color: rgba(75, 15, 15, 0.92);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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 _renderer = require("../renderer");
|
|
10
|
+
var _libgif = _interopRequireDefault(require("libgif"));
|
|
11
|
+
var _excluded = ["geometry", "properties", "style"];
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
14
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
18
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
+
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; }
|
|
22
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
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); } }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
28
|
+
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); }
|
|
29
|
+
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); }
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
+
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); }; }
|
|
32
|
+
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); }
|
|
33
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
34
|
+
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; } }
|
|
35
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
36
|
+
var Marker = exports["default"] = /*#__PURE__*/function (_Entity) {
|
|
37
|
+
_inherits(Marker, _Entity);
|
|
38
|
+
var _super = _createSuper(Marker);
|
|
39
|
+
function Marker(options) {
|
|
40
|
+
var _this;
|
|
41
|
+
_classCallCheck(this, Marker);
|
|
42
|
+
var geometry = options.geometry,
|
|
43
|
+
properties = options.properties,
|
|
44
|
+
style = options.style,
|
|
45
|
+
other = _objectWithoutProperties(options, _excluded);
|
|
46
|
+
var props = _objectSpread({
|
|
47
|
+
clampToGround: true,
|
|
48
|
+
position: _cesium.Cartesian3.fromDegrees.apply(_cesium.Cartesian3, _toConsumableArray(geometry)),
|
|
49
|
+
properties: new _cesium.PropertyBag(properties),
|
|
50
|
+
billboard: _objectSpread({}, (0, _renderer.Marker)(_objectSpread({}, style)))
|
|
51
|
+
}, other);
|
|
52
|
+
_this = _super.call(this, props);
|
|
53
|
+
if (style !== null && style !== void 0 && style.image && style !== null && style !== void 0 && style.imageType) {
|
|
54
|
+
var imageType = style.imageType,
|
|
55
|
+
image = style.image,
|
|
56
|
+
imageKey = style.imageKey;
|
|
57
|
+
if (imageType === 'gif') {
|
|
58
|
+
_this.setGifImage(image, imageKey);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return _this;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 设置 gif 图标
|
|
65
|
+
_createClass(Marker, [{
|
|
66
|
+
key: "setGifImage",
|
|
67
|
+
value: function setGifImage(image, imageKey) {
|
|
68
|
+
var _this2 = this;
|
|
69
|
+
var gifDiv = document.createElement('div');
|
|
70
|
+
var gifImg = document.createElement('img');
|
|
71
|
+
|
|
72
|
+
// gif库需要img标签配置下面两个属性
|
|
73
|
+
gifImg.setAttribute('rel:animated_src', image);
|
|
74
|
+
gifImg.setAttribute('rel:auto_play', '1'); // 设置自动播放属性
|
|
75
|
+
gifDiv.appendChild(gifImg);
|
|
76
|
+
var superGif = new _libgif["default"]({
|
|
77
|
+
gif: gifImg
|
|
78
|
+
});
|
|
79
|
+
window.gifImages = window.gifImages || {};
|
|
80
|
+
window.gifImages[imageKey] = superGif;
|
|
81
|
+
|
|
82
|
+
// 解析gif每帧图片,按时间序列进行切换
|
|
83
|
+
superGif.load(function () {
|
|
84
|
+
_this2.billboard.image = new _cesium.CallbackProperty(function () {
|
|
85
|
+
return superGif.get_canvas().toDataURL();
|
|
86
|
+
}, false);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
key: "setGeometry",
|
|
91
|
+
value: function setGeometry(geometry) {
|
|
92
|
+
this.position.setValue(_cesium.Cartesian3.fromDegrees.apply(_cesium.Cartesian3, _toConsumableArray(geometry)));
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
key: "setProperties",
|
|
96
|
+
value: function setProperties(properties) {
|
|
97
|
+
this.properties.setValue(new _cesium.PropertyBag(properties));
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
key: "getProperties",
|
|
101
|
+
value: function getProperties() {
|
|
102
|
+
return this.properties;
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
key: "setStyle",
|
|
106
|
+
value: function setStyle(style) {
|
|
107
|
+
(0, _renderer.setEntityStyle)(this.billboard, (0, _renderer.Marker)(_objectSpread({}, style)));
|
|
108
|
+
}
|
|
109
|
+
}]);
|
|
110
|
+
return Marker;
|
|
111
|
+
}(_cesium.Entity);
|
|
112
|
+
//# sourceMappingURL=Marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Marker.js","names":["_cesium","require","_renderer","_libgif","_interopRequireDefault","_excluded","obj","__esModule","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","ownKeys","e","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","arg","_toPrimitive","_typeof","String","input","hint","prim","toPrimitive","undefined","res","Number","_inherits","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf","result","NewTarget","Reflect","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","getPrototypeOf","Marker","exports","_Entity","_super","options","_this","geometry","properties","style","other","clampToGround","position","Cartesian3","fromDegrees","PropertyBag","billboard","getStyle","image","imageType","imageKey","setGifImage","_this2","gifDiv","document","createElement","gifImg","setAttribute","appendChild","superGif","SuperGif","gif","window","gifImages","load","CallbackProperty","get_canvas","toDataURL","setGeometry","setValue","setProperties","getProperties","setStyle","setEntityStyle","Entity"],"sources":["marker/Marker.js"],"sourcesContent":["import { Entity, Cartesian3, PropertyBag, CallbackProperty } from 'cesium';\nimport { Marker as getStyle, setEntityStyle } from '../renderer';\nimport SuperGif from 'libgif';\n\nexport default class Marker extends Entity {\n constructor(options) {\n const { geometry, properties, style, ...other } = options;\n let props = {\n clampToGround: true,\n position: Cartesian3.fromDegrees(...geometry),\n properties: new PropertyBag(properties),\n billboard: {\n ...getStyle({ ...style }),\n },\n ...other,\n };\n\n super(props);\n\n if (style?.image && style?.imageType) {\n const {imageType, image, imageKey} = style;\n if (imageType === 'gif') {\n this.setGifImage(image, imageKey);\n }\n }\n }\n\n // 设置 gif 图标\n setGifImage(image, imageKey) {\n let gifDiv = document.createElement('div')\n let gifImg = document.createElement('img')\n\n // gif库需要img标签配置下面两个属性\n gifImg.setAttribute('rel:animated_src', image)\n gifImg.setAttribute('rel:auto_play', '1') // 设置自动播放属性\n gifDiv.appendChild(gifImg)\n\n let superGif = new SuperGif({\n gif: gifImg\n });\n\n window.gifImages = window.gifImages || {};\n window.gifImages[imageKey] = superGif;\n\n // 解析gif每帧图片,按时间序列进行切换\n superGif.load(() => {\n this.billboard.image = new CallbackProperty(() => {\n return superGif.get_canvas().toDataURL()\n }, false)\n })\n }\n\n setGeometry(geometry) {\n this.position.setValue(Cartesian3.fromDegrees(...geometry));\n }\n\n setProperties(properties) {\n this.properties.setValue(new PropertyBag(properties));\n }\n\n getProperties() {\n return this.properties;\n }\n\n setStyle(style) {\n setEntityStyle(this.billboard, getStyle({ ...style }));\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA8B,IAAAI,SAAA;AAAA,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,mBAAAC,GAAA,WAAAC,kBAAA,CAAAD,GAAA,KAAAE,gBAAA,CAAAF,GAAA,KAAAG,2BAAA,CAAAH,GAAA,KAAAI,kBAAA;AAAA,SAAAA,mBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAG,CAAA,EAAAC,MAAA,SAAAD,CAAA,qBAAAA,CAAA,sBAAAE,iBAAA,C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G,SAASjC,KAAK,EAAE;MACZ,IAAAkC,wBAAc,EAAC,IAAI,CAAC3B,SAAS,EAAE,IAAAC,gBAAQ,EAAAtF,aAAA,KAAM8E,KAAK,CAAE,CAAC,CAAC;IAC1D;EAAC;EAAA,OAAAR,MAAA;AAAA,EA9D+B2C,cAAM"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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"] = _default;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _ahooks = require("ahooks");
|
|
10
|
+
var _Marker = _interopRequireDefault(require("./Marker"));
|
|
11
|
+
var _events = require("../events");
|
|
12
|
+
var _useProps2 = _interopRequireDefault(require("../_util/useProps"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
|
+
function _default(props) {
|
|
17
|
+
var data = props.data,
|
|
18
|
+
property = props.property,
|
|
19
|
+
style = props.style;
|
|
20
|
+
var featureRef = (0, _react.useRef)();
|
|
21
|
+
var _useProps = (0, _useProps2["default"])(),
|
|
22
|
+
featureLayer = _useProps.featureLayer;
|
|
23
|
+
(0, _react.useEffect)(function () {
|
|
24
|
+
var feature = new _Marker["default"]({
|
|
25
|
+
geometry: data,
|
|
26
|
+
style: style,
|
|
27
|
+
properties: property
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// 注册事件
|
|
31
|
+
(0, _events.registerEventGeometry)(feature, props);
|
|
32
|
+
featureLayer.entities.add(feature);
|
|
33
|
+
featureRef.current = feature;
|
|
34
|
+
return function () {
|
|
35
|
+
featureLayer.entities.remove(feature);
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
39
|
+
featureRef.current.setGeometry(data);
|
|
40
|
+
}, [JSON.stringify(data)]);
|
|
41
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
42
|
+
featureRef.current.setProperties(property);
|
|
43
|
+
}, [JSON.stringify(property)]);
|
|
44
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
45
|
+
featureRef.current.setStyle(style);
|
|
46
|
+
}, [JSON.stringify(style)]);
|
|
47
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_ahooks","_Marker","_interopRequireDefault","_events","_useProps2","obj","__esModule","_getRequireWildcardCache","e","WeakMap","r","t","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_default","props","data","property","style","featureRef","useRef","_useProps","useProps","featureLayer","useEffect","feature","Marker","geometry","properties","registerEventGeometry","entities","add","current","remove","useUpdateEffect","setGeometry","JSON","stringify","setProperties","setStyle","createElement","Fragment"],"sources":["marker/index.jsx"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport { useUpdateEffect } from 'ahooks';\nimport Marker from './Marker';\nimport { registerEventGeometry } from '../events';\nimport useProps from \"../_util/useProps\";\n\nexport default function(props) {\n const { data, property, style } = props;\n const featureRef = useRef();\n const { featureLayer } = useProps();\n\n useEffect(() => {\n let feature = new Marker({\n geometry: data,\n style,\n properties: property,\n });\n\n // 注册事件\n registerEventGeometry(feature, props);\n\n featureLayer.entities.add(feature);\n\n featureRef.current = feature;\n\n return () => {\n featureLayer.entities.remove(feature);\n };\n }, []);\n\n useUpdateEffect(() => {\n featureRef.current.setGeometry(data);\n }, [JSON.stringify(data)]);\n\n useUpdateEffect(() => {\n featureRef.current.setProperties(property);\n }, [JSON.stringify(property)]);\n\n useUpdateEffect(() => {\n featureRef.current.setStyle(style);\n }, [JSON.stringify(style)]);\n\n return <></>;\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAF,sBAAA,CAAAH,OAAA;AAAyC,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAF,UA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;MACdE,KAAK,EAALA,KAAK;MACLU,UAAU,EAAEX;IAChB,CAAC,CAAC;;IAEF;IACA,IAAAY,6BAAqB,EAACJ,OAAO,EAAEV,KAAK,CAAC;IAErCQ,YAAY,CAACO,QAAQ,CAACC,GAAG,CAACN,OAAO,CAAC;IAElCN,UAAU,CAACa,OAAO,GAAGP,OAAO;IAE5B,OAAO,YAAM;MACTF,YAAY,CAACO,QAAQ,CAACG,MAAM,CAACR,OAAO,CAAC;IACzC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAS,uBAAe,EAAC,YAAM;IAClBf,UAAU,CAACa,OAAO,CAACG,WAAW,CAACnB,IAAI,CAAC;EACxC,CAAC,EAAE,CAACoB,IAAI,CAACC,SAAS,CAACrB,IAAI,CAAC,CAAC,CAAC;EAE1B,IAAAkB,uBAAe,EAAC,YAAM;IAClBf,UAAU,CAACa,OAAO,CAACM,aAAa,CAACrB,QAAQ,CAAC;EAC9C,CAAC,EAAE,CAACmB,IAAI,CAACC,SAAS,CAACpB,QAAQ,CAAC,CAAC,CAAC;EAE9B,IAAAiB,uBAAe,EAAC,YAAM;IAClBf,UAAU,CAACa,OAAO,CAACO,QAAQ,CAACrB,KAAK,CAAC;EACtC,CAAC,EAAE,CAACkB,IAAI,CAACC,SAAS,CAACnB,KAAK,CAAC,CAAC,CAAC;EAE3B,oBAAOlC,MAAA,YAAAwD,aAAA,CAAAxD,MAAA,YAAAyD,QAAA,MAAI,CAAC;AAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["marker/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["marker/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 _renderer = require("../renderer");
|
|
10
|
+
var _excluded = ["geometry", "properties", "style"];
|
|
11
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
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; }
|
|
20
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
+
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); } }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
26
|
+
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); }
|
|
27
|
+
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); }
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
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); }; }
|
|
30
|
+
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); }
|
|
31
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
32
|
+
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; } }
|
|
33
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
|
+
var Point = exports["default"] = /*#__PURE__*/function (_Entity) {
|
|
35
|
+
_inherits(Point, _Entity);
|
|
36
|
+
var _super = _createSuper(Point);
|
|
37
|
+
function Point(options) {
|
|
38
|
+
_classCallCheck(this, Point);
|
|
39
|
+
var geometry = options.geometry,
|
|
40
|
+
properties = options.properties,
|
|
41
|
+
style = options.style,
|
|
42
|
+
other = _objectWithoutProperties(options, _excluded);
|
|
43
|
+
var props = _objectSpread({
|
|
44
|
+
clampToGround: true,
|
|
45
|
+
position: _cesium.Cartesian3.fromDegrees.apply(_cesium.Cartesian3, _toConsumableArray(geometry)),
|
|
46
|
+
properties: new _cesium.PropertyBag(properties),
|
|
47
|
+
point: _objectSpread({}, (0, _renderer.Point)(_objectSpread({}, style)))
|
|
48
|
+
}, other);
|
|
49
|
+
return _super.call(this, props);
|
|
50
|
+
}
|
|
51
|
+
_createClass(Point, [{
|
|
52
|
+
key: "setGeometry",
|
|
53
|
+
value: function setGeometry(geometry) {
|
|
54
|
+
this.position.setValue(_cesium.Cartesian3.fromDegrees.apply(_cesium.Cartesian3, _toConsumableArray(geometry)));
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "setProperties",
|
|
58
|
+
value: function setProperties(properties) {
|
|
59
|
+
this.properties.setValue(new _cesium.PropertyBag(properties));
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "setStyle",
|
|
63
|
+
value: function setStyle(style) {
|
|
64
|
+
(0, _renderer.setEntityStyle)(this.point, (0, _renderer.Point)(_objectSpread({}, style)));
|
|
65
|
+
}
|
|
66
|
+
}]);
|
|
67
|
+
return Point;
|
|
68
|
+
}(_cesium.Entity);
|
|
69
|
+
//# sourceMappingURL=Point.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Point.js","names":["_cesium","require","_renderer","_excluded","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","ownKeys","e","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","arg","_toPrimitive","_typeof","String","input","hint","prim","toPrimitive","undefined","res","Number","_inherits","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf","result","NewTarget","Reflect","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","getPrototypeOf","Point","exports","_Entity","_super","options","geometry","properties","style","other","clampToGround","position","Cartesian3","fromDegrees","PropertyBag","point","getStyle","setGeometry","setValue","setProperties","setStyle","setEntityStyle","Entity"],"sources":["point/Point.js"],"sourcesContent":["import { Entity, Cartesian3, PropertyBag } from 'cesium';\nimport { Point as getStyle, setEntityStyle } from '../renderer';\n\nexport default class Point extends Entity {\n constructor(options) {\n const { geometry, properties, style, ...other } = options;\n\n let props = {\n clampToGround: true,\n position: Cartesian3.fromDegrees(...geometry),\n properties: new PropertyBag(properties),\n point: {\n ...getStyle({ ...style }),\n },\n ...other,\n };\n\n super(props);\n }\n\n setGeometry(geometry) {\n this.position.setValue(Cartesian3.fromDegrees(...geometry));\n }\n\n setProperties(properties) {\n this.properties.setValue(new PropertyBag(properties));\n }\n\n setStyle(style) {\n setEntitySt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,QAAQ,EAAC,CAAC;IAC/D;EAAC;IAAApE,GAAA;IAAAC,KAAA,EAED,SAAAgF,cAAcZ,UAAU,EAAE;MACtB,IAAI,CAACA,UAAU,CAACW,QAAQ,CAAC,IAAIJ,mBAAW,CAACP,UAAU,CAAC,CAAC;IACzD;EAAC;IAAArE,GAAA;IAAAC,KAAA,EAED,SAAAiF,SAASZ,KAAK,EAAE;MACZ,IAAAa,wBAAc,EAAC,IAAI,CAACN,KAAK,EAAE,IAAAC,eAAQ,EAAAtF,aAAA,KAAM8E,KAAK,CAAE,CAAC,CAAC;IACtD;EAAC;EAAA,OAAAP,KAAA;AAAA,EA3B8BqB,cAAM"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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"] = _default;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _ahooks = require("ahooks");
|
|
10
|
+
var _Point = _interopRequireDefault(require("./Point"));
|
|
11
|
+
var _events = require("../events");
|
|
12
|
+
var _useProps2 = _interopRequireDefault(require("../_util/useProps"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
|
+
function _default(props) {
|
|
17
|
+
var data = props.data,
|
|
18
|
+
property = props.property,
|
|
19
|
+
style = props.style;
|
|
20
|
+
var featureRef = (0, _react.useRef)();
|
|
21
|
+
var _useProps = (0, _useProps2["default"])(),
|
|
22
|
+
featureLayer = _useProps.featureLayer;
|
|
23
|
+
(0, _react.useEffect)(function () {
|
|
24
|
+
var feature = new _Point["default"]({
|
|
25
|
+
geometry: data,
|
|
26
|
+
style: style,
|
|
27
|
+
properties: property
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// 注册事件
|
|
31
|
+
(0, _events.registerEventGeometry)(feature, props);
|
|
32
|
+
featureLayer.entities.add(feature);
|
|
33
|
+
featureRef.current = feature;
|
|
34
|
+
return function () {
|
|
35
|
+
featureLayer.entities.remove(feature);
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
39
|
+
featureRef.current.setGeometry(data);
|
|
40
|
+
}, [JSON.stringify(data)]);
|
|
41
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
42
|
+
featureRef.current.setProperties(property);
|
|
43
|
+
}, [JSON.stringify(property)]);
|
|
44
|
+
(0, _ahooks.useUpdateEffect)(function () {
|
|
45
|
+
featureRef.current.setStyle(style);
|
|
46
|
+
}, [JSON.stringify(style)]);
|
|
47
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_ahooks","_Point","_interopRequireDefault","_events","_useProps2","obj","__esModule","_getRequireWildcardCache","e","WeakMap","r","t","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_default","props","data","property","style","featureRef","useRef","_useProps","useProps","featureLayer","useEffect","feature","Point","geometry","properties","registerEventGeometry","entities","add","current","remove","useUpdateEffect","setGeometry","JSON","stringify","setProperties","setStyle","createElement","Fragment"],"sources":["point/index.jsx"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport { useUpdateEffect } from 'ahooks';\nimport Point from './Point';\nimport { registerEventGeometry } from '../events';\nimport useProps from \"../_util/useProps\";\n\nexport default function(props) {\n const { data, property, style } = props;\n const featureRef = useRef();\n const { featureLayer } = useProps();\n\n useEffect(() => {\n let feature = new Point({\n geometry: data,\n style,\n properties: property,\n });\n\n // 注册事件\n registerEventGeometry(feature, props);\n\n featureLayer.entities.add(feature);\n\n featureRef.current = feature;\n\n return () => {\n featureLayer.entities.remove(feature);\n };\n }, []);\n\n useUpdateEffect(() => {\n featureRef.current.setGeometry(data);\n }, [JSON.stringify(data)]);\n\n useUpdateEffect(() => {\n featureRef.current.setProperties(property);\n }, [JSON.stringify(property)]);\n\n useUpdateEffect(() => {\n featureRef.current.setStyle(style);\n }, [JSON.stringify(style)]);\n\n return <></>;\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAF,sBAAA,CAAAH,OAAA;AAAyC,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OA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
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["point/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 _renderer = require("../renderer");
|
|
10
|
+
var _excluded = ["geometry", "properties", "style"];
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
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; }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
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); } }
|
|
18
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
+
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); }
|
|
21
|
+
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); }
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
+
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); }; }
|
|
24
|
+
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); }
|
|
25
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26
|
+
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; } }
|
|
27
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
28
|
+
var Polygon = exports["default"] = /*#__PURE__*/function (_Entity) {
|
|
29
|
+
_inherits(Polygon, _Entity);
|
|
30
|
+
var _super = _createSuper(Polygon);
|
|
31
|
+
function Polygon(options) {
|
|
32
|
+
_classCallCheck(this, Polygon);
|
|
33
|
+
var geometry = options.geometry,
|
|
34
|
+
properties = options.properties,
|
|
35
|
+
style = options.style,
|
|
36
|
+
other = _objectWithoutProperties(options, _excluded);
|
|
37
|
+
var props = _objectSpread({
|
|
38
|
+
clampToGround: true,
|
|
39
|
+
properties: new _cesium.PropertyBag(properties),
|
|
40
|
+
polygon: _objectSpread({
|
|
41
|
+
clampToGround: true,
|
|
42
|
+
hierarchy: _cesium.Cartesian3.fromDegreesArray(geometry.flat(Infinity)),
|
|
43
|
+
extrudedHeight: 0
|
|
44
|
+
}, (0, _renderer.Polygon)(_objectSpread({}, style)))
|
|
45
|
+
}, other);
|
|
46
|
+
return _super.call(this, props);
|
|
47
|
+
}
|
|
48
|
+
_createClass(Polygon, [{
|
|
49
|
+
key: "setGeometry",
|
|
50
|
+
value: function setGeometry(geometry) {
|
|
51
|
+
this.polygon.hierarchy._value.positions.positions = _cesium.Cartesian3.fromDegreesArray(geometry.flat(Infinity));
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
key: "setProperties",
|
|
55
|
+
value: function setProperties(properties) {
|
|
56
|
+
this.properties.setValue(new _cesium.PropertyBag(properties));
|
|
57
|
+
this.polygon.properties.setValue(new _cesium.PropertyBag(properties));
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
key: "setStyle",
|
|
61
|
+
value: function setStyle(style) {
|
|
62
|
+
(0, _renderer.setEntityStyle)(this.polygon, (0, _renderer.Polygon)(_objectSpread({}, style)));
|
|
63
|
+
}
|
|
64
|
+
}]);
|
|
65
|
+
return Polygon;
|
|
66
|
+
}(_cesium.Entity);
|
|
67
|
+
//# sourceMappingURL=Polygon.js.map
|