@vtx/cs-map 1.0.90 → 1.0.92
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/CHANGELOG.md +124 -124
- package/README.md +202 -202
- package/lib/_util/EventEmitter.js +3 -4
- package/lib/_util/EventEmitter.js.map +1 -1
- package/lib/_util/Provider.js.map +1 -1
- package/lib/_util/StyleCache.js +3 -4
- package/lib/_util/StyleCache.js.map +1 -1
- package/lib/_util/cesium.js +10 -11
- package/lib/_util/cesium.js.map +1 -1
- package/lib/_util/encryptParams.js.map +1 -1
- package/lib/_util/filterSpecialCharacters.js +6 -6
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/generateRandomPosition.js +5 -5
- package/lib/_util/generateRandomPosition.js.map +1 -1
- package/lib/_util/getBBoxFromGeojson.js +11 -12
- package/lib/_util/getBBoxFromGeojson.js.map +1 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getCookie.js +4 -4
- package/lib/_util/getCookie.js.map +1 -1
- package/lib/_util/getDefaultMapInfo.js +2 -2
- package/lib/_util/getDefaultMapInfo.js.map +1 -1
- package/lib/_util/getSystemInfo.js +2 -2
- package/lib/_util/getSystemInfo.js.map +1 -1
- package/lib/_util/getToken.js +2 -2
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/heightAndZoom.js.map +1 -1
- package/lib/_util/http.js +21 -22
- package/lib/_util/http.js.map +1 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/layer.js +3 -3
- package/lib/_util/layer.js.map +1 -1
- package/lib/_util/mapTool.js +34 -34
- package/lib/_util/mapTool.js.map +1 -1
- package/lib/_util/setCookie.js +4 -4
- package/lib/_util/setCookie.js.map +1 -1
- package/lib/_util/transformRgb.js.map +1 -1
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useProps.js.map +1 -1
- package/lib/_util/useSet.js +2 -2
- package/lib/_util/useSet.js.map +1 -1
- package/lib/assets/excavate_bottom_min.png +0 -0
- package/lib/assets/excavate_kuangqu.png +0 -0
- package/lib/building-tiles-layer/BuildingTilesLayer.js +9 -11
- package/lib/building-tiles-layer/BuildingTilesLayer.js.map +1 -1
- package/lib/building-tiles-layer/index.js +4 -4
- package/lib/building-tiles-layer/index.js.map +1 -1
- package/lib/building-tiles-layer/style/css.js.map +1 -1
- package/lib/building-tiles-layer/style/index.js.map +1 -1
- package/lib/cesium-tiles-layer/CesiumTilesLayer.js +10 -12
- package/lib/cesium-tiles-layer/CesiumTilesLayer.js.map +1 -1
- package/lib/cesium-tiles-layer/demo/assets/baseMapImg-1.png +0 -0
- package/lib/cesium-tiles-layer/demo/assets/baseMapImg.png +0 -0
- package/lib/cesium-tiles-layer/demo/assets/round.png +0 -0
- package/lib/cesium-tiles-layer/demo/assets/water.png +0 -0
- package/lib/cesium-tiles-layer/demo/index.css +3 -0
- package/lib/cesium-tiles-layer/demo/index.less +101 -98
- package/lib/cesium-tiles-layer/index.js +4 -4
- package/lib/cesium-tiles-layer/index.js.map +1 -1
- package/lib/cesium-tiles-layer/style/css.js.map +1 -1
- package/lib/cesium-tiles-layer/style/index.js.map +1 -1
- package/lib/circle/Circle.js +9 -11
- package/lib/circle/Circle.js.map +1 -1
- package/lib/circle/index.js +2 -2
- package/lib/circle/index.js.map +1 -1
- package/lib/circle/style/css.js.map +1 -1
- package/lib/circle/style/index.js.map +1 -1
- package/lib/circle-fly/index.js +27 -17
- package/lib/circle-fly/index.js.map +1 -1
- package/lib/circle-fly/style/css.js.map +1 -1
- package/lib/circle-fly/style/index.js.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/demand-layer/DemandLayer.js +11 -13
- package/lib/demand-layer/DemandLayer.js.map +1 -1
- package/lib/demand-layer/index.js +2 -2
- package/lib/demand-layer/index.js.map +1 -1
- package/lib/demand-layer/style/css.js.map +1 -1
- package/lib/demand-layer/style/index.js.map +1 -1
- package/lib/dom/Dom.js +3 -4
- package/lib/dom/Dom.js.map +1 -1
- package/lib/dom/index.js +4 -4
- package/lib/dom/index.js.map +1 -1
- package/lib/dom/style/css.js.map +1 -1
- package/lib/dom/style/index.js.map +1 -1
- package/lib/events/index.js.map +1 -1
- package/lib/excavation-analysis/TilesetCut.js +203 -0
- package/lib/excavation-analysis/TilesetCut.js.map +1 -0
- package/lib/excavation-analysis/hooks/useDrawHandler.js +142 -0
- package/lib/excavation-analysis/hooks/useDrawHandler.js.map +1 -0
- package/lib/excavation-analysis/hooks/useTerrainClipPlan.js +292 -0
- package/lib/excavation-analysis/hooks/useTerrainClipPlan.js.map +1 -0
- package/lib/excavation-analysis/hooks/useTileSetCut.js +31 -0
- package/lib/excavation-analysis/hooks/useTileSetCut.js.map +1 -0
- package/lib/excavation-analysis/index.js +84 -0
- package/lib/excavation-analysis/index.js.map +1 -0
- package/lib/excavation-analysis/style/css.js +4 -0
- package/lib/excavation-analysis/style/css.js.map +1 -0
- package/lib/excavation-analysis/style/index.css +0 -0
- package/lib/excavation-analysis/style/index.js +4 -0
- package/lib/excavation-analysis/style/index.js.map +1 -0
- package/lib/excavation-analysis/style/index.less +0 -0
- package/lib/feature-layer/FeatureLayer.js +11 -13
- package/lib/feature-layer/FeatureLayer.js.map +1 -1
- package/lib/feature-layer/createFeatureCollection.js +13 -13
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js +4 -4
- package/lib/feature-layer/index.js.map +1 -1
- package/lib/feature-layer/style/css.js.map +1 -1
- package/lib/feature-layer/style/index.js.map +1 -1
- package/lib/fence-layer/FenceLayer.js +11 -13
- package/lib/fence-layer/FenceLayer.js.map +1 -1
- package/lib/fence-layer/GradualLightRingMaterialProperty.js +5 -5
- package/lib/fence-layer/GradualLightRingMaterialProperty.js.map +1 -1
- package/lib/fence-layer/index.js +4 -4
- package/lib/fence-layer/index.js.map +1 -1
- package/lib/fence-layer/style/css.js.map +1 -1
- package/lib/fence-layer/style/index.js.map +1 -1
- package/lib/fly-line-layer/FlyLineLayer.js +31 -29
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
- package/lib/fly-line-layer/LineFlowMaterialProperty.js +3 -4
- package/lib/fly-line-layer/LineFlowMaterialProperty.js.map +1 -1
- package/lib/fly-line-layer/index.js +2 -2
- package/lib/fly-line-layer/index.js.map +1 -1
- package/lib/fly-line-layer/style/css.js.map +1 -1
- package/lib/fly-line-layer/style/index.js.map +1 -1
- package/lib/gif-dom-layer/GifDomLayer.js +3 -4
- package/lib/gif-dom-layer/GifDomLayer.js.map +1 -1
- package/lib/gif-dom-layer/index.js +2 -2
- package/lib/gif-dom-layer/index.js.map +1 -1
- package/lib/gif-dom-layer/style/css.js.map +1 -1
- package/lib/gif-dom-layer/style/index.js.map +1 -1
- package/lib/gradation-line-layer/GradationLineLayer.js +9 -11
- package/lib/gradation-line-layer/GradationLineLayer.js.map +1 -1
- package/lib/gradation-line-layer/index.js +2 -2
- package/lib/gradation-line-layer/index.js.map +1 -1
- package/lib/gradation-line-layer/style/css.js.map +1 -1
- package/lib/gradation-line-layer/style/index.js.map +1 -1
- package/lib/group-layer/GroupLayer.js +3 -4
- package/lib/group-layer/GroupLayer.js.map +1 -1
- package/lib/group-layer/index.js +2 -2
- package/lib/group-layer/index.js.map +1 -1
- package/lib/group-layer/style/css.js.map +1 -1
- package/lib/group-layer/style/index.js.map +1 -1
- package/lib/heatmap-layer/CesiumHeatmap.js +23 -24
- package/lib/heatmap-layer/CesiumHeatmap.js.map +1 -1
- package/lib/heatmap-layer/HeatmapLayer.js +9 -11
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
- package/lib/heatmap-layer/heatmap.js +41 -42
- package/lib/heatmap-layer/heatmap.js.map +1 -1
- package/lib/heatmap-layer/index.js +4 -4
- package/lib/heatmap-layer/index.js.map +1 -1
- package/lib/heatmap-layer/style/css.js.map +1 -1
- package/lib/heatmap-layer/style/index.js.map +1 -1
- package/lib/highlight-layer/HighlightLayer.js +10 -11
- package/lib/highlight-layer/HighlightLayer.js.map +1 -1
- package/lib/highlight-layer/index.js +2 -2
- package/lib/highlight-layer/index.js.map +1 -1
- package/lib/highlight-layer/style/css.js.map +1 -1
- package/lib/highlight-layer/style/index.js.map +1 -1
- package/lib/image-layer/ImageLayer.js +11 -13
- package/lib/image-layer/ImageLayer.js.map +1 -1
- package/lib/image-layer/index.js +4 -4
- package/lib/image-layer/index.js.map +1 -1
- package/lib/image-layer/style/css.js.map +1 -1
- package/lib/image-layer/style/index.js.map +1 -1
- package/lib/image-wms-layer/ImageWmsLayer.js +3 -4
- package/lib/image-wms-layer/ImageWmsLayer.js.map +1 -1
- package/lib/image-wms-layer/index.js +4 -4
- package/lib/image-wms-layer/index.js.map +1 -1
- package/lib/image-wms-layer/style/css.js.map +1 -1
- package/lib/image-wms-layer/style/index.js.map +1 -1
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -1
- package/lib/inundate-analysis/index.js +2 -2
- package/lib/inundate-analysis/index.js.map +1 -1
- package/lib/inundate-analysis/style/css.js.map +1 -1
- package/lib/inundate-analysis/style/index.js.map +1 -1
- package/lib/label/Label.js +9 -11
- package/lib/label/Label.js.map +1 -1
- package/lib/label/index.js +2 -2
- package/lib/label/index.js.map +1 -1
- package/lib/label/style/css.js.map +1 -1
- package/lib/label/style/index.js.map +1 -1
- package/lib/legend/index.js +4 -4
- package/lib/legend/index.js.map +1 -1
- package/lib/legend/style/css.js.map +1 -1
- package/lib/legend/style/index.js.map +1 -1
- package/lib/legend/style/index.less +74 -74
- package/lib/line-flow-layer/LineFlowLayer.js +9 -12
- package/lib/line-flow-layer/LineFlowLayer.js.map +1 -1
- package/lib/line-flow-layer/index.js +2 -2
- package/lib/line-flow-layer/index.js.map +1 -1
- package/lib/line-flow-layer/style/css.js.map +1 -1
- package/lib/line-flow-layer/style/index.js.map +1 -1
- package/lib/map/InfoTool/index.js +59 -67
- package/lib/map/InfoTool/index.js.map +1 -1
- package/lib/map/InfoTool/index.less +46 -46
- package/lib/map/InfoTool/util.js +23 -23
- package/lib/map/InfoTool/util.js.map +1 -1
- package/lib/map/InfoWindow.js +2 -2
- package/lib/map/InfoWindow.js.map +1 -1
- package/lib/map/Layers.js +9 -11
- package/lib/map/Layers.js.map +1 -1
- package/lib/map/Popup.js +3 -3
- package/lib/map/Popup.js.map +1 -1
- package/lib/map/base/imagery/amap/AmapImageryProvider.js +8 -9
- package/lib/map/base/imagery/amap/AmapImageryProvider.js.map +1 -1
- package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js +8 -9
- package/lib/map/base/imagery/amap/AmapMercatorTilingScheme.js.map +1 -1
- package/lib/map/base/imagery/baidu/BaiduImageryProvider.js +3 -4
- package/lib/map/base/imagery/baidu/BaiduImageryProvider.js.map +1 -1
- package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js +80 -81
- package/lib/map/base/imagery/baidu/BaiduMercatorProjection.js.map +1 -1
- package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js +24 -26
- package/lib/map/base/imagery/baidu/BaiduMercatorTilingScheme.js.map +1 -1
- package/lib/map/base/imagery/geoq/GeoQImageryProvider.js +12 -13
- package/lib/map/base/imagery/geoq/GeoQImageryProvider.js.map +1 -1
- package/lib/map/base/imagery/google/GoogleImageryProvider.js +8 -9
- package/lib/map/base/imagery/google/GoogleImageryProvider.js.map +1 -1
- package/lib/map/base/imagery/irs/IRSImageryProvider.js +12 -14
- package/lib/map/base/imagery/irs/IRSImageryProvider.js.map +1 -1
- package/lib/map/base/imagery/tdt/JiangSuTdtImageryProvider.js +48 -0
- package/lib/map/base/imagery/tdt/JiangSuTdtImageryProvider.js.map +1 -0
- package/lib/map/base/imagery/tdt/TdtImageryProvider.js +12 -14
- package/lib/map/base/imagery/tdt/TdtImageryProvider.js.map +1 -1
- package/lib/map/base/imagery/tencent/TencentImageryProvider.js +8 -9
- package/lib/map/base/imagery/tencent/TencentImageryProvider.js.map +1 -1
- package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js +8 -9
- package/lib/map/base/imagery/transform/AmapMercatorTilingScheme.js.map +1 -1
- package/lib/map/base/imagery/transform/CoordTransform.js +45 -46
- package/lib/map/base/imagery/transform/CoordTransform.js.map +1 -1
- package/lib/map/base/index.js +34 -13
- package/lib/map/base/index.js.map +1 -1
- package/lib/map/hooks/useGetMapFeatureInfoByText.js +1 -1
- package/lib/map/hooks/useGetMapFeatureInfoByText.js.map +1 -1
- package/lib/map/index.js +55 -38
- package/lib/map/index.js.map +1 -1
- package/lib/map/material/AroundPoint.js +3 -4
- package/lib/map/material/AroundPoint.js.map +1 -1
- package/lib/map/material/CircleRippleMaterialProperty.js +5 -6
- package/lib/map/material/CircleRippleMaterialProperty.js.map +1 -1
- package/lib/map/material/ODLineLayer.js +3 -4
- package/lib/map/material/ODLineLayer.js.map +1 -1
- package/lib/map/material/PolylineTrailLinkMaterialProperty.js +3 -4
- package/lib/map/material/PolylineTrailLinkMaterialProperty.js.map +1 -1
- package/lib/map/material/PolylineTrailMaterialProperty.js +3 -4
- package/lib/map/material/PolylineTrailMaterialProperty.js.map +1 -1
- package/lib/map/material/TilesBuilding.js +3 -4
- package/lib/map/material/TilesBuilding.js.map +1 -1
- package/lib/map/material/index.js.map +1 -1
- package/lib/map/style/css.js.map +1 -1
- package/lib/map/style/index.js.map +1 -1
- package/lib/map/style/index.less +248 -248
- package/lib/marker/Marker.js +9 -11
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js +2 -2
- package/lib/marker/index.js.map +1 -1
- package/lib/marker/style/css.js.map +1 -1
- package/lib/marker/style/index.js.map +1 -1
- package/lib/model/Model.js +9 -11
- package/lib/model/Model.js.map +1 -1
- package/lib/model/index.js +4 -4
- package/lib/model/index.js.map +1 -1
- package/lib/model/style/css.js.map +1 -1
- package/lib/model/style/index.js.map +1 -1
- package/lib/navigation/index.js +2 -2
- package/lib/navigation/index.js.map +1 -1
- package/lib/navigation/style/css.js.map +1 -1
- package/lib/navigation/style/index.js.map +1 -1
- package/lib/navigation/style/index.less +176 -176
- package/lib/pipe-tiles-layer/PipeTilesLayer.js +9 -10
- package/lib/pipe-tiles-layer/PipeTilesLayer.js.map +1 -1
- package/lib/pipe-tiles-layer/index.js +4 -4
- package/lib/pipe-tiles-layer/index.js.map +1 -1
- package/lib/pipe-tiles-layer/style/css.js.map +1 -1
- package/lib/pipe-tiles-layer/style/index.js.map +1 -1
- package/lib/point/Point.js +9 -11
- package/lib/point/Point.js.map +1 -1
- package/lib/point/index.js +2 -2
- package/lib/point/index.js.map +1 -1
- package/lib/point/style/css.js.map +1 -1
- package/lib/point/style/index.js.map +1 -1
- package/lib/polygon/Polygon.js +9 -11
- package/lib/polygon/Polygon.js.map +1 -1
- package/lib/polygon/index.js +2 -2
- package/lib/polygon/index.js.map +1 -1
- package/lib/polygon/style/css.js.map +1 -1
- package/lib/polygon/style/index.js.map +1 -1
- package/lib/polyline/Polyline.js +9 -11
- package/lib/polyline/Polyline.js.map +1 -1
- package/lib/polyline/index.js +2 -2
- package/lib/polyline/index.js.map +1 -1
- package/lib/polyline/style/css.js.map +1 -1
- package/lib/polyline/style/index.js.map +1 -1
- package/lib/renderer/index.js +17 -18
- package/lib/renderer/index.js.map +1 -1
- package/lib/renderer/style/css.js.map +1 -1
- package/lib/renderer/style/index.js.map +1 -1
- package/lib/scene-roam/index.js +4 -4
- package/lib/scene-roam/index.js.map +1 -1
- package/lib/scene-roam/style/css.js.map +1 -1
- package/lib/scene-roam/style/index.js.map +1 -1
- package/lib/split-screen/index.js +131 -0
- package/lib/split-screen/index.js.map +1 -0
- package/lib/split-screen/style/css.js +2 -0
- package/lib/split-screen/style/css.js.map +1 -0
- package/lib/split-screen/style/index.js +2 -0
- package/lib/split-screen/style/index.js.map +1 -0
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/tools/base-map-switch/index.js +4 -4
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Icon/index.js.map +1 -1
- package/lib/tools/components/Icon/svg.js.map +1 -1
- package/lib/tools/components/Modal/index.js +2 -2
- package/lib/tools/components/Modal/index.js.map +1 -1
- package/lib/tools/components/Modal/index.less +33 -33
- package/lib/tools/components/item-wrap/index.js +2 -2
- package/lib/tools/components/item-wrap/index.js.map +1 -1
- package/lib/tools/components/tool-Item/index.js.map +1 -1
- package/lib/tools/components/tool-Item/index.less +27 -27
- package/lib/tools/dimension-switch/index.js +2 -2
- package/lib/tools/dimension-switch/index.js.map +1 -1
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js +4 -4
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/layer-control-popover/LayersCheckService.js +0 -1
- package/lib/tools/layer-control-popover/LayersCheckService.js.map +1 -1
- package/lib/tools/layer-control-popover/index.js +5 -5
- package/lib/tools/layer-control-popover/index.js.map +1 -1
- package/lib/tools/loading/index.js +2 -2
- package/lib/tools/loading/index.js.map +1 -1
- package/lib/tools/map-search/Select/index.js +7 -7
- package/lib/tools/map-search/Select/index.js.map +1 -1
- package/lib/tools/map-search/Select/style/css.js.map +1 -1
- package/lib/tools/map-search/Select/style/index.js.map +1 -1
- package/lib/tools/map-search/Select/style/index.less +47 -47
- package/lib/tools/map-search/index.js +5 -5
- package/lib/tools/map-search/index.js.map +1 -1
- package/lib/tools/style/css.js.map +1 -1
- package/lib/tools/style/index.js.map +1 -1
- package/lib/tools/style/index.less +307 -307
- package/lib/tools/tip/index.js.map +1 -1
- package/lib/tools/tool-box/Measure/Area/index.js.map +1 -1
- package/lib/tools/tool-box/Measure/Distance/index.js.map +1 -1
- package/lib/tools/tool-box/Measure/Height/index.js.map +1 -1
- package/lib/tools/tool-box/Measure/Measure.js +34 -35
- package/lib/tools/tool-box/Measure/Measure.js.map +1 -1
- package/lib/tools/tool-box/Measure/index.js +2 -2
- package/lib/tools/tool-box/Measure/index.js.map +1 -1
- package/lib/tools/tool-box/index.js +2 -3
- package/lib/tools/tool-box/index.js.map +1 -1
- package/lib/trail-polyline-layer/TrailPolylineLayer.js +9 -11
- package/lib/trail-polyline-layer/TrailPolylineLayer.js.map +1 -1
- package/lib/trail-polyline-layer/TrailPolylineMaterial.js +2 -2
- package/lib/trail-polyline-layer/TrailPolylineMaterial.js.map +1 -1
- package/lib/trail-polyline-layer/index.js +2 -2
- package/lib/trail-polyline-layer/index.js.map +1 -1
- package/lib/trail-polyline-layer/style/css.js.map +1 -1
- package/lib/trail-polyline-layer/style/index.js.map +1 -1
- package/lib/use-props/index.js.map +1 -1
- package/lib/use-props/style/css.js.map +1 -1
- package/lib/use-props/style/index.js.map +1 -1
- package/lib/wall/WallGeometry.js +13 -12
- package/lib/wall/WallGeometry.js.map +1 -1
- package/lib/wall/index.js +2 -2
- package/lib/wall/index.js.map +1 -1
- package/lib/wall/style/css.js.map +1 -1
- package/lib/wall/style/index.js.map +1 -1
- package/lib/water-surface-layer/WaterSurfaceLayer.js +37 -22
- package/lib/water-surface-layer/WaterSurfaceLayer.js.map +1 -1
- package/lib/water-surface-layer/index.js +4 -4
- package/lib/water-surface-layer/index.js.map +1 -1
- package/lib/water-surface-layer/style/css.js.map +1 -1
- package/lib/water-surface-layer/style/index.js.map +1 -1
- package/lib/weather/Weather.js +31 -32
- package/lib/weather/Weather.js.map +1 -1
- package/lib/weather/index.js +2 -2
- package/lib/weather/index.js.map +1 -1
- package/lib/weather/style/css.js.map +1 -1
- package/lib/weather/style/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/polygon/FlowMaterial.js +0 -57
- package/lib/polygon/FlowMaterial.js.map +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _cesium = require("cesium");
|
|
9
|
+
var useTerrainClipPlan = function useTerrainClipPlan(props) {
|
|
10
|
+
var viewer = props.viewer;
|
|
11
|
+
var showResult = (0, _react.useRef)(true);
|
|
12
|
+
var wellWall = (0, _react.useRef)();
|
|
13
|
+
var bottomSurface = (0, _react.useRef)();
|
|
14
|
+
var wellData = (0, _react.useRef)();
|
|
15
|
+
var excavateMinHeight = (0, _react.useRef)(9999);
|
|
16
|
+
var wallImgStr = (0, _react.useRef)();
|
|
17
|
+
var bottomImgStr = (0, _react.useRef)();
|
|
18
|
+
var splitNumber = (0, _react.useRef)();
|
|
19
|
+
var heightNum = (0, _react.useRef)(0);
|
|
20
|
+
var positionsCur = (0, _react.useRef)([]);
|
|
21
|
+
|
|
22
|
+
// 设置是否显示
|
|
23
|
+
var show = function show(isShow) {
|
|
24
|
+
showResult.current = isShow;
|
|
25
|
+
if (viewer.scene.globe.clippingPlanes) viewer.scene.globe.clippingPlanes.enabled = isShow;
|
|
26
|
+
switchExcavate(isShow);
|
|
27
|
+
};
|
|
28
|
+
var switchExcavate = function switchExcavate(isSHow) {
|
|
29
|
+
if (!bottomSurface.current) return;
|
|
30
|
+
if (isSHow) {
|
|
31
|
+
viewer.scene.globe.material = _cesium.Material.fromType("WaJue");
|
|
32
|
+
if (wellWall.current) wellWall.current.show = isSHow;
|
|
33
|
+
bottomSurface.current.show = isSHow;
|
|
34
|
+
} else {
|
|
35
|
+
viewer.globe.material = null;
|
|
36
|
+
if (wellWall.current) wellWall.current.show = !isSHow;
|
|
37
|
+
bottomSurface.current.show = !isSHow;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var updateExcavateDepth = function updateExcavateDepth(height) {
|
|
41
|
+
if (!wellData.current) return;
|
|
42
|
+
if (bottomSurface.current) viewer.scene.primitives.remove(bottomSurface.current);
|
|
43
|
+
if (wellWall.current) viewer.scene.primitives.remove(wellWall.current);
|
|
44
|
+
var lerpos = wellData.current.lerp_pos;
|
|
45
|
+
var res = [];
|
|
46
|
+
for (var i = 0; i < lerpos.length; i++) {
|
|
47
|
+
res.push(_cesium.Cartesian3.fromRadians(lerpos[i].latitude, excavateMinHeight.current - height));
|
|
48
|
+
}
|
|
49
|
+
heightNum.current = height;
|
|
50
|
+
updateData(positionsCur.current);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// 开挖分析
|
|
54
|
+
var start = function start(attrs) {
|
|
55
|
+
var wallImg = attrs.wallImg,
|
|
56
|
+
splitNum = attrs.splitNum,
|
|
57
|
+
height = attrs.height,
|
|
58
|
+
positions = attrs.positions,
|
|
59
|
+
bottomImg = attrs.bottomImg;
|
|
60
|
+
wallImgStr.current = wallImg;
|
|
61
|
+
splitNumber.current = splitNum;
|
|
62
|
+
heightNum.current = height;
|
|
63
|
+
bottomImgStr.current = bottomImg;
|
|
64
|
+
positionsCur.current = positions;
|
|
65
|
+
updateData(positionsCur.current);
|
|
66
|
+
};
|
|
67
|
+
var createWell = function createWell(data) {
|
|
68
|
+
if (viewer.terrainProvider._layers) {
|
|
69
|
+
createBottomSurface(data.bottom_pos);
|
|
70
|
+
(0, _cesium.when)((0, _cesium.sampleTerrainMostDetailed)(viewer.terrainProvider, data.lerp_pos), function (arr) {
|
|
71
|
+
var no_height_top = [];
|
|
72
|
+
for (var i = 0; i < arr.length; i++) {
|
|
73
|
+
var s = _cesium.Cartesian3.fromRadians(arr[i].longitude, arr[i].latitude, arr[i].height);
|
|
74
|
+
no_height_top.push(s);
|
|
75
|
+
}
|
|
76
|
+
createWellWall(data.bottom_pos, no_height_top);
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
createBottomSurface(data.bottom_pos);
|
|
80
|
+
createWellWall(data.bottom_pos, data.no_height_top);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
var createBottomSurface = function createBottomSurface(bottom_pos) {
|
|
84
|
+
if (bottom_pos.length) {
|
|
85
|
+
var minHeight = getMinHeight(bottom_pos);
|
|
86
|
+
var points = [];
|
|
87
|
+
for (var i = 0; i < bottom_pos.length; i++) {
|
|
88
|
+
var p = ellipsoidToLonLat(bottom_pos[i]);
|
|
89
|
+
points.push(p.longitude);
|
|
90
|
+
points.push(p.latitude);
|
|
91
|
+
points.push(minHeight);
|
|
92
|
+
}
|
|
93
|
+
if (!points) return;
|
|
94
|
+
var polygon = new _cesium.PolygonGeometry({
|
|
95
|
+
polygonHierarchy: new _cesium.PolygonHierarchy(_cesium.Cartesian3.fromDegreesArrayHeights(points)),
|
|
96
|
+
perPositionHeight: true
|
|
97
|
+
});
|
|
98
|
+
var geometry = _cesium.PolygonGeometry.createGeometry(polygon);
|
|
99
|
+
var material = new _cesium.Material({
|
|
100
|
+
fabric: {
|
|
101
|
+
type: 'Image',
|
|
102
|
+
uniforms: {
|
|
103
|
+
image: bottomImgStr.current
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
var appearance = new _cesium.MaterialAppearance({
|
|
108
|
+
translucent: false,
|
|
109
|
+
flat: true,
|
|
110
|
+
material: material
|
|
111
|
+
});
|
|
112
|
+
if (!geometry) return;
|
|
113
|
+
bottomSurface.current = new _cesium.Primitive({
|
|
114
|
+
geometryInstances: new _cesium.GeometryInstance({
|
|
115
|
+
geometry: geometry
|
|
116
|
+
}),
|
|
117
|
+
appearance: appearance,
|
|
118
|
+
asynchronous: false
|
|
119
|
+
});
|
|
120
|
+
viewer.scene.primitives.add(bottomSurface.current);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var createWellWall = function createWellWall(bottom_pos, no_height_topt) {
|
|
124
|
+
var minHeight = getMinHeight(bottom_pos);
|
|
125
|
+
var maxHeights = [];
|
|
126
|
+
var minHeights = [];
|
|
127
|
+
for (var i = 0; i < no_height_topt.length; i++) {
|
|
128
|
+
maxHeights.push(ellipsoidToLonLat(no_height_topt[i]).altitude);
|
|
129
|
+
minHeights.push(minHeight);
|
|
130
|
+
}
|
|
131
|
+
var wall = new _cesium.WallGeometry({
|
|
132
|
+
positions: no_height_topt,
|
|
133
|
+
maximumHeights: maxHeights,
|
|
134
|
+
minimumHeights: minHeights
|
|
135
|
+
});
|
|
136
|
+
var geometry = _cesium.WallGeometry.createGeometry(wall);
|
|
137
|
+
var material = new _cesium.Material({
|
|
138
|
+
fabric: {
|
|
139
|
+
type: 'Image',
|
|
140
|
+
uniforms: {
|
|
141
|
+
image: wallImgStr.current
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
var appearance = new _cesium.MaterialAppearance({
|
|
146
|
+
translucent: false,
|
|
147
|
+
flat: true,
|
|
148
|
+
material: material
|
|
149
|
+
});
|
|
150
|
+
if (geometry) {
|
|
151
|
+
var primitive = new _cesium.Primitive({
|
|
152
|
+
geometryInstances: new _cesium.GeometryInstance({
|
|
153
|
+
geometry: geometry,
|
|
154
|
+
attributes: {
|
|
155
|
+
color: _cesium.ColorGeometryInstanceAttribute.fromColor(_cesium.Color.GREY)
|
|
156
|
+
},
|
|
157
|
+
id: 'PitWall'
|
|
158
|
+
}),
|
|
159
|
+
appearance: appearance,
|
|
160
|
+
asynchronous: false
|
|
161
|
+
});
|
|
162
|
+
wellWall.current = primitive;
|
|
163
|
+
viewer.scene.primitives.add(primitive);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
var getMinHeight = function getMinHeight(cartesians) {
|
|
167
|
+
var _minPoint;
|
|
168
|
+
var minHeight = 5000000;
|
|
169
|
+
var minPoint = null;
|
|
170
|
+
for (var i = 0; i < cartesians.length; i++) {
|
|
171
|
+
var height = cartesians[i]['z'];
|
|
172
|
+
if (height < minHeight) {
|
|
173
|
+
minHeight = height;
|
|
174
|
+
minPoint = ellipsoidToLonLat(cartesians[i]);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return (_minPoint = minPoint) === null || _minPoint === void 0 ? void 0 : _minPoint.altitude;
|
|
178
|
+
};
|
|
179
|
+
var ellipsoidToLonLat = function ellipsoidToLonLat(cartesian) {
|
|
180
|
+
var ellipsoid = viewer.scene.globe.ellipsoid;
|
|
181
|
+
var cartesian3 = new _cesium.Cartesian3(cartesian.x, cartesian.y, cartesian.z);
|
|
182
|
+
var cartographic = ellipsoid.cartesianToCartographic(cartesian3);
|
|
183
|
+
var latitude = _cesium.Math.toDegrees(cartographic.latitude);
|
|
184
|
+
var longitude = _cesium.Math.toDegrees(cartographic.longitude);
|
|
185
|
+
var altitude = cartographic.height;
|
|
186
|
+
return {
|
|
187
|
+
longitude: longitude,
|
|
188
|
+
latitude: latitude,
|
|
189
|
+
altitude: altitude
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
// 更新开挖深度
|
|
194
|
+
var updateData = function updateData(points) {
|
|
195
|
+
clear();
|
|
196
|
+
var planes = [];
|
|
197
|
+
var pointsLength = points.length;
|
|
198
|
+
// 计算分量差
|
|
199
|
+
// const subtr = Cartesian3.subtract(positions[0], positions[1], new Cartesian3())
|
|
200
|
+
excavateMinHeight.current = 9999;
|
|
201
|
+
for (var i = 0; i < pointsLength; ++i) {
|
|
202
|
+
var nextIndex = (i + 1) % pointsLength;
|
|
203
|
+
// 计算中间值
|
|
204
|
+
var midpoint = _cesium.Cartesian3.midpoint(points[i], points[nextIndex], new _cesium.Cartesian3());
|
|
205
|
+
var catographic = _cesium.Cartographic.fromCartesian(points[i]);
|
|
206
|
+
var height = viewer.scene.globe.getHeight(catographic) || catographic.height;
|
|
207
|
+
height < excavateMinHeight.current && (excavateMinHeight.current = height);
|
|
208
|
+
var up = _cesium.Cartesian3.normalize(midpoint, new _cesium.Cartesian3());
|
|
209
|
+
var right = _cesium.Cartesian3.subtract(points[nextIndex], midpoint, new _cesium.Cartesian3());
|
|
210
|
+
right = _cesium.Cartesian3.normalize(right, right);
|
|
211
|
+
var cross = _cesium.Cartesian3.cross(right, up, new _cesium.Cartesian3());
|
|
212
|
+
cross = _cesium.Cartesian3.normalize(cross, cross);
|
|
213
|
+
var plane = new _cesium.Plane(cross, 0.0);
|
|
214
|
+
var distance = _cesium.Plane.getPointDistance(plane, midpoint);
|
|
215
|
+
planes.push(new _cesium.ClippingPlane(cross, distance));
|
|
216
|
+
}
|
|
217
|
+
viewer.scene.globe.clippingPlanes = new _cesium.ClippingPlaneCollection({
|
|
218
|
+
planes: planes,
|
|
219
|
+
edgeWidth: 1,
|
|
220
|
+
edgeColor: _cesium.Color.WHITE,
|
|
221
|
+
enabled: true,
|
|
222
|
+
unionClippingRegions: false
|
|
223
|
+
});
|
|
224
|
+
prepareWell(points);
|
|
225
|
+
if (wellData.current) {
|
|
226
|
+
createWell(wellData.current);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
// 清除开挖分析结果
|
|
231
|
+
var clear = function clear() {
|
|
232
|
+
var _viewer$scene$globe$c;
|
|
233
|
+
if (viewer.scene.globe.clippingPlanes) {
|
|
234
|
+
viewer.scene.globe.clippingPlanes.enabled = !1;
|
|
235
|
+
viewer.scene.globe.clippingPlanes.removeAll();
|
|
236
|
+
}
|
|
237
|
+
if (viewer.scene.globe.clippingPlanes && !((_viewer$scene$globe$c = viewer.scene.globe.clippingPlanes) !== null && _viewer$scene$globe$c !== void 0 && _viewer$scene$globe$c.isDestroyed)) {
|
|
238
|
+
viewer.scene.globe.clippingPlanes.destroy();
|
|
239
|
+
}
|
|
240
|
+
viewer.scene.globe.clippingPlanes = undefined;
|
|
241
|
+
if (bottomSurface.current) viewer.scene.primitives.remove(bottomSurface.current);
|
|
242
|
+
if (wellWall.current) viewer.scene.primitives.remove(wellWall.current);
|
|
243
|
+
bottomSurface.current = undefined;
|
|
244
|
+
wellWall.current = undefined;
|
|
245
|
+
viewer.scene.render();
|
|
246
|
+
};
|
|
247
|
+
var prepareWell = function prepareWell(points) {
|
|
248
|
+
var len = points.length;
|
|
249
|
+
if (len !== 0) {
|
|
250
|
+
var no_height_top = [];
|
|
251
|
+
var bottom_pos = [];
|
|
252
|
+
var lerp_pos = [];
|
|
253
|
+
var diff = excavateMinHeight.current - heightNum.current;
|
|
254
|
+
for (var i = 0; i < len; i++) {
|
|
255
|
+
var nextIndex = i === len - 1 ? 0 : i + 1;
|
|
256
|
+
var currentCattesian = _cesium.Cartographic.fromCartesian(points[i]);
|
|
257
|
+
var nextCartorghic = _cesium.Cartographic.fromCartesian(points[nextIndex]);
|
|
258
|
+
var currLonLat = [currentCattesian.longitude, currentCattesian.latitude];
|
|
259
|
+
var nextLonLat = [nextCartorghic.longitude, nextCartorghic.latitude];
|
|
260
|
+
if (i === 0) {
|
|
261
|
+
lerp_pos.push(new _cesium.Cartographic(currLonLat[0], currLonLat[1]));
|
|
262
|
+
bottom_pos.push(_cesium.Cartesian3.fromRadians(currLonLat[0], currLonLat[1], diff));
|
|
263
|
+
no_height_top.push(_cesium.Cartesian3.fromRadians(currLonLat[0], currLonLat[1], 0));
|
|
264
|
+
}
|
|
265
|
+
if (!splitNumber.current) return;
|
|
266
|
+
for (var p = 1; p <= splitNumber.current; p++) {
|
|
267
|
+
var firstLerp = _cesium.Math.lerp(currLonLat[0], nextLonLat[0], p / splitNumber.current);
|
|
268
|
+
var lastLerp = _cesium.Math.lerp(currLonLat[1], nextLonLat[1], p / splitNumber.current);
|
|
269
|
+
if (i !== len - 1 || p !== splitNumber.current) {
|
|
270
|
+
lerp_pos.push(new _cesium.Cartographic(firstLerp, lastLerp));
|
|
271
|
+
bottom_pos.push(_cesium.Cartesian3.fromRadians(firstLerp, lastLerp, diff));
|
|
272
|
+
no_height_top.push(_cesium.Cartesian3.fromRadians(firstLerp, lastLerp, 0));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
wellData.current = {
|
|
277
|
+
lerp_pos: lerp_pos,
|
|
278
|
+
bottom_pos: bottom_pos,
|
|
279
|
+
no_height_top: no_height_top
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
return {
|
|
284
|
+
start: start,
|
|
285
|
+
clear: clear,
|
|
286
|
+
updateData: updateData,
|
|
287
|
+
updateExcavateDepth: updateExcavateDepth,
|
|
288
|
+
show: show
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
var _default = exports["default"] = useTerrainClipPlan;
|
|
292
|
+
//# sourceMappingURL=useTerrainClipPlan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTerrainClipPlan.js","names":["_react","require","_cesium","useTerrainClipPlan","props","viewer","showResult","useRef","wellWall","bottomSurface","wellData","excavateMinHeight","wallImgStr","bottomImgStr","splitNumber","heightNum","positionsCur","show","isShow","current","scene","globe","clippingPlanes","enabled","switchExcavate","isSHow","material","Material","fromType","updateExcavateDepth","height","primitives","remove","lerpos","lerp_pos","res","i","length","push","Cartesian3","fromRadians","latitude","updateData","start","attrs","wallImg","splitNum","positions","bottomImg","createWell","data","terrainProvider","_layers","createBottomSurface","bottom_pos","when","sampleTerrainMostDetailed","arr","no_height_top","s","longitude","createWellWall","minHeight","getMinHeight","points","p","ellipsoidToLonLat","polygon","PolygonGeometry","polygonHierarchy","PolygonHierarchy","fromDegreesArrayHeights","perPositionHeight","geometry","createGeometry","fabric","type","uniforms","image","appearance","MaterialAppearance","translucent","flat","Primitive","geometryInstances","GeometryInstance","asynchronous","add","no_height_topt","maxHeights","minHeights","altitude","wall","WallGeometry","maximumHeights","minimumHeights","primitive","attributes","color","ColorGeometryInstanceAttribute","fromColor","Color","GREY","id","cartesians","_minPoint","minPoint","cartesian","ellipsoid","cartesian3","x","y","z","cartographic","cartesianToCartographic","CesiumMath","toDegrees","clear","planes","pointsLength","nextIndex","midpoint","catographic","Cartographic","fromCartesian","getHeight","up","normalize","right","subtract","cross","plane","Plane","distance","getPointDistance","ClippingPlane","ClippingPlaneCollection","edgeWidth","edgeColor","WHITE","unionClippingRegions","prepareWell","_viewer$scene$globe$c","removeAll","isDestroyed","destroy","undefined","render","len","diff","currentCattesian","nextCartorghic","currLonLat","nextLonLat","firstLerp","lerp","lastLerp","_default","exports"],"sources":["excavation-analysis/hooks/useTerrainClipPlan.js"],"sourcesContent":["import { useRef } from 'react';\nimport {\n Cartographic,\n Cartesian3,\n Math as CesiumMath,\n when,\n sampleTerrainMostDetailed,\n PolygonGeometry,\n PolygonHierarchy,\n Material,\n MaterialAppearance,\n Primitive,\n GeometryInstance,\n WallGeometry,\n ColorGeometryInstanceAttribute,\n Color,\n Plane,\n ClippingPlane,\n ClippingPlaneCollection\n} from 'cesium';\n\nconst useTerrainClipPlan = (props) => {\n const { viewer } = props\n const showResult = useRef(true)\n const wellWall = useRef()\n const bottomSurface = useRef()\n const wellData = useRef()\n const excavateMinHeight = useRef(9999)\n const wallImgStr = useRef()\n const bottomImgStr = useRef()\n const splitNumber = useRef()\n const heightNum = useRef(0)\n const positionsCur = useRef([])\n\n // 设置是否显示\n const show = (isShow) => {\n showResult.current = isShow\n if (viewer.scene.globe.clippingPlanes) viewer.scene.globe.clippingPlanes.enabled = isShow\n switchExcavate(isShow)\n }\n\n const switchExcavate = (isSHow) => {\n if (!bottomSurface.current) return\n if (isSHow) {\n viewer.scene.globe.material = Material.fromType(\"WaJue\")\n if (wellWall.current) wellWall.current.show = isSHow\n bottomSurface.current.show = isSHow\n } else {\n viewer.globe.material = null\n if (wellWall.current) wellWall.current.show = !isSHow\n bottomSurface.current.show = !isSHow\n }\n }\n\n\n const updateExcavateDepth = (height) => {\n if (!wellData.current) return\n\n if (bottomSurface.current) viewer.scene.primitives.remove(bottomSurface.current)\n if (wellWall.current) viewer.scene.primitives.remove(wellWall.current)\n\n const lerpos = wellData.current.lerp_pos\n const res = []\n for (let i = 0; i < lerpos.length; i++){\n res.push(Cartesian3.fromRadians(lerpos[i].latitude, excavateMinHeight.current - height))\n }\n heightNum.current = height\n updateData(positionsCur.current)\n }\n\n // 开挖分析\n const start = (attrs) => {\n const { wallImg, splitNum, height, positions, bottomImg } = attrs\n wallImgStr.current = wallImg\n splitNumber.current = splitNum\n heightNum.current = height\n bottomImgStr.current = bottomImg\n positionsCur.current = positions\n updateData(positionsCur.current)\n }\n\n const createWell = (data) => {\n if (viewer.terrainProvider._layers) {\n createBottomSurface(data.bottom_pos);\n when(sampleTerrainMostDetailed(viewer.terrainProvider, data.lerp_pos), function (arr) {\n const no_height_top = []\n for (let i = 0; i < arr.length; i++) {\n const s = Cartesian3.fromRadians(arr[i].longitude, arr[i].latitude, arr[i].height)\n no_height_top.push(s)\n }\n createWellWall(data.bottom_pos, no_height_top)\n })\n } else {\n createBottomSurface(data.bottom_pos)\n createWellWall(data.bottom_pos, data.no_height_top)\n }\n }\n\n const createBottomSurface = (bottom_pos) => {\n if (bottom_pos.length) {\n const minHeight = getMinHeight(bottom_pos)\n const points = []\n for (let i = 0; i < bottom_pos.length; i++) {\n const p = ellipsoidToLonLat(bottom_pos[i])\n points.push(p.longitude)\n points.push(p.latitude)\n points.push(minHeight)\n }\n if (!points) return\n const polygon = new PolygonGeometry({\n polygonHierarchy: new PolygonHierarchy(\n Cartesian3.fromDegreesArrayHeights(points)\n ),\n perPositionHeight: true\n })\n const geometry = PolygonGeometry.createGeometry(polygon)\n const material = new Material({\n fabric: {\n type: 'Image',\n uniforms: {\n image: bottomImgStr.current\n }\n }\n })\n const appearance = new MaterialAppearance({\n translucent: false,\n flat: true,\n material\n })\n\n if (!geometry) return\n bottomSurface.current = new Primitive({\n geometryInstances: new GeometryInstance({\n geometry\n }),\n appearance,\n asynchronous: false\n })\n viewer.scene.primitives.add(bottomSurface.current)\n }\n }\n\n const createWellWall = (bottom_pos, no_height_topt) => {\n const minHeight = getMinHeight(bottom_pos)\n const maxHeights = []\n const minHeights = []\n for (let i = 0; i < no_height_topt.length; i++) {\n maxHeights.push(ellipsoidToLonLat(no_height_topt[i]).altitude)\n minHeights.push(minHeight)\n }\n const wall = new WallGeometry({\n positions: no_height_topt,\n maximumHeights: maxHeights,\n minimumHeights: minHeights,\n })\n const geometry = WallGeometry.createGeometry(wall)\n\n const material = new Material({\n fabric: {\n type: 'Image',\n uniforms: {\n image: wallImgStr.current\n }\n }\n })\n const appearance = new MaterialAppearance({\n translucent: false,\n flat: true,\n material\n })\n if (geometry) {\n const primitive = new Primitive({\n geometryInstances: new GeometryInstance({\n geometry,\n attributes: {\n color: ColorGeometryInstanceAttribute.fromColor(Color.GREY)\n },\n id: 'PitWall'\n }),\n appearance,\n asynchronous: false\n })\n wellWall.current = primitive\n viewer.scene.primitives.add(primitive)\n }\n }\n\n const getMinHeight = (cartesians) => {\n let minHeight = 5000000\n let minPoint = null\n for (let i = 0; i < cartesians.length; i++) {\n const height = cartesians[i]['z']\n if (height < minHeight) {\n minHeight = height\n minPoint = ellipsoidToLonLat(cartesians[i])\n }\n }\n return minPoint?.altitude\n }\n\n const ellipsoidToLonLat = (cartesian) => {\n const ellipsoid = viewer.scene.globe.ellipsoid\n const cartesian3 = new Cartesian3(cartesian.x, cartesian.y, cartesian.z)\n const cartographic = ellipsoid.cartesianToCartographic(cartesian3)\n const latitude = CesiumMath.toDegrees(cartographic.latitude)\n const longitude = CesiumMath.toDegrees(cartographic.longitude)\n const altitude = cartographic.height\n return {\n longitude,\n latitude,\n altitude\n }\n }\n\n // 更新开挖深度\n const updateData = (points) => {\n clear()\n const planes = []\n const pointsLength = points.length\n // 计算分量差\n // const subtr = Cartesian3.subtract(positions[0], positions[1], new Cartesian3())\n excavateMinHeight.current = 9999\n\n for (let i = 0; i < pointsLength; ++i) {\n const nextIndex = (i + 1) % pointsLength\n // 计算中间值\n const midpoint = Cartesian3.midpoint(points[i], points[nextIndex], new Cartesian3())\n\n const catographic = Cartographic.fromCartesian(points[i])\n const height = viewer.scene.globe.getHeight(catographic) || catographic.height\n height < excavateMinHeight.current && (excavateMinHeight.current = height)\n\n const up = Cartesian3.normalize(midpoint, new Cartesian3())\n let right = Cartesian3.subtract(points[nextIndex], midpoint, new Cartesian3())\n right = Cartesian3.normalize(right, right)\n let cross = Cartesian3.cross(right, up, new Cartesian3())\n cross = Cartesian3.normalize(cross, cross)\n const plane = new Plane(cross, 0.0)\n const distance = Plane.getPointDistance(plane, midpoint)\n planes.push(new ClippingPlane(cross, distance))\n }\n viewer.scene.globe.clippingPlanes = new ClippingPlaneCollection({\n planes,\n edgeWidth: 1,\n edgeColor: Color.WHITE,\n enabled: true,\n unionClippingRegions: false\n })\n\n prepareWell(points)\n if (wellData.current) {\n createWell(wellData.current)\n }\n }\n\n // 清除开挖分析结果\n const clear = () => {\n if (viewer.scene.globe.clippingPlanes) {\n viewer.scene.globe.clippingPlanes.enabled = !1\n viewer.scene.globe.clippingPlanes.removeAll()\n }\n if (viewer.scene.globe.clippingPlanes && !viewer.scene.globe.clippingPlanes?.isDestroyed) {\n viewer.scene.globe.clippingPlanes.destroy()\n }\n viewer.scene.globe.clippingPlanes = undefined\n if (bottomSurface.current) viewer.scene.primitives.remove(bottomSurface.current)\n if (wellWall.current) viewer.scene.primitives.remove(wellWall.current)\n bottomSurface.current = undefined\n wellWall.current = undefined\n viewer.scene.render()\n }\n\n const prepareWell = (points) => {\n const len = points.length\n if (len !== 0) {\n const no_height_top = []\n const bottom_pos = []\n const lerp_pos = []\n const diff = excavateMinHeight.current - heightNum.current\n for (let i = 0; i < len; i++) {\n const nextIndex = i === len - 1 ? 0 : i + 1\n const currentCattesian = Cartographic.fromCartesian(points[i])\n const nextCartorghic = Cartographic.fromCartesian(points[nextIndex])\n const currLonLat = [currentCattesian.longitude, currentCattesian.latitude]\n const nextLonLat = [nextCartorghic.longitude, nextCartorghic.latitude]\n\n if (i === 0) {\n lerp_pos.push(new Cartographic(currLonLat[0], currLonLat[1]))\n bottom_pos.push(Cartesian3.fromRadians(currLonLat[0], currLonLat[1], diff))\n no_height_top.push(Cartesian3.fromRadians(currLonLat[0], currLonLat[1], 0))\n }\n\n if (!splitNumber.current) return\n\n for (let p = 1; p <= splitNumber.current; p++) {\n const firstLerp = CesiumMath.lerp(currLonLat[0], nextLonLat[0], p / splitNumber.current)\n const lastLerp = CesiumMath.lerp(currLonLat[1], nextLonLat[1], p / splitNumber.current)\n if (i !== len - 1 || p !== splitNumber.current) {\n lerp_pos.push(new Cartographic(firstLerp, lastLerp))\n bottom_pos.push(Cartesian3.fromRadians(firstLerp, lastLerp, diff))\n no_height_top.push(Cartesian3.fromRadians(firstLerp, lastLerp, 0))\n }\n }\n }\n wellData.current = {\n lerp_pos,\n bottom_pos,\n no_height_top\n }\n }\n }\n\n return { start, clear, updateData, updateExcavateDepth, show }\n}\n\nexport default useTerrainClipPlan;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAoBA,IAAME,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,KAAK,EAAK;EAClC,IAAQC,MAAM,GAAKD,KAAK,CAAhBC,MAAM;EACd,IAAMC,UAAU,GAAG,IAAAC,aAAM,EAAC,IAAI,CAAC;EAC/B,IAAMC,QAAQ,GAAG,IAAAD,aAAM,EAAC,CAAC;EACzB,IAAME,aAAa,GAAG,IAAAF,aAAM,EAAC,CAAC;EAC9B,IAAMG,QAAQ,GAAG,IAAAH,aAAM,EAAC,CAAC;EACzB,IAAMI,iBAAiB,GAAG,IAAAJ,aAAM,EAAC,IAAI,CAAC;EACtC,IAAMK,UAAU,GAAG,IAAAL,aAAM,EAAC,CAAC;EAC3B,IAAMM,YAAY,GAAG,IAAAN,aAAM,EAAC,CAAC;EAC7B,IAAMO,WAAW,GAAG,IAAAP,aAAM,EAAC,CAAC;EAC5B,IAAMQ,SAAS,GAAG,IAAAR,aAAM,EAAC,CAAC,CAAC;EAC3B,IAAMS,YAAY,GAAG,IAAAT,aAAM,EAAC,EAAE,CAAC;;EAE/B;EACA,IAAMU,IAAI,GAAG,SAAPA,IAAIA,CAAIC,MAAM,EAAK;IACrBZ,UAAU,CAACa,OAAO,GAAGD,MAAM;IAC3B,IAAIb,MAAM,CAACe,KAAK,CAACC,KAAK,CAACC,cAAc,EAAEjB,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Aa,EAAbA;MACJ,CAAC;IACL;EACJ,CAAC;EAED,OAAO;IAAEf,KAAK,EAALA,KAAK;IAAE0E,KAAK,EAALA,KAAK;IAAE3E,UAAU,EAAVA,UAAU;IAAEb,mBAAmB,EAAnBA,mBAAmB;IAAEZ,IAAI,EAAJA;EAAK,CAAC;AAClE,CAAC;AAAA,IAAA4I,QAAA,GAAAC,OAAA,cAEc3J,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _TilesetCut = _interopRequireDefault(require("../TilesetCut"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
var useTileSetCut = function useTileSetCut(props) {
|
|
11
|
+
var viewer = props.viewer,
|
|
12
|
+
sceneId = props.sceneId;
|
|
13
|
+
var cutToolRef = (0, _react.useRef)();
|
|
14
|
+
var loadTileSetCut = function loadTileSetCut() {
|
|
15
|
+
if (cutToolRef.current) {
|
|
16
|
+
return cutToolRef.current;
|
|
17
|
+
}
|
|
18
|
+
if (sceneId) {
|
|
19
|
+
var layer = viewer.getLayerByKey(sceneId);
|
|
20
|
+
if (layer) {
|
|
21
|
+
cutToolRef.current = new _TilesetCut["default"](layer);
|
|
22
|
+
return cutToolRef.current;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
loadTileSetCut: loadTileSetCut
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
var _default = exports["default"] = useTileSetCut;
|
|
31
|
+
//# sourceMappingURL=useTileSetCut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTileSetCut.js","names":["_react","require","_TilesetCut","_interopRequireDefault","obj","__esModule","useTileSetCut","props","viewer","sceneId","cutToolRef","useRef","loadTileSetCut","current","layer","getLayerByKey","TilesetCut","_default","exports"],"sources":["excavation-analysis/hooks/useTileSetCut.js"],"sourcesContent":["import {useRef} from 'react';\nimport TilesetCut from \"../TilesetCut\";\n\nconst useTileSetCut = (props) => {\n const {viewer, sceneId} = props;\n\n const cutToolRef = useRef();\n\n const loadTileSetCut = () => {\n if (cutToolRef.current) {\n return cutToolRef.current;\n }\n\n if (sceneId) {\n let layer = viewer.getLayerByKey(sceneId);\n if (layer) {\n cutToolRef.current = new TilesetCut(layer);\n return cutToolRef.current;\n }\n }\n }\n\n\n return {loadTileSetCut}\n}\n\nexport default useTileSetCut;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAEvC,IAAME,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAK,EAAK;EAC7B,IAAOC,MAAM,GAAaD,KAAK,CAAxBC,MAAM;IAAEC,OAAO,GAAIF,KAAK,CAAhBE,OAAO;EAEtB,IAAMC,UAAU,GAAG,IAAAC,aAAM,EAAC,CAAC;EAE3B,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAA,EAAS;IACzB,IAAIF,UAAU,CAACG,OAAO,EAAE;MACpB,OAAOH,UAAU,CAACG,OAAO;IAC7B;IAEA,IAAIJ,OAAO,EAAE;MACT,IAAIK,KAAK,GAAGN,MAAM,CAACO,aAAa,CAACN,OAAO,CAAC;MACzC,IAAIK,KAAK,EAAE;QACPJ,UAAU,CAACG,OAAO,GAAG,IAAIG,sBAAU,CAACF,KAAK,CAAC;QAC1C,OAAOJ,UAAU,CAACG,OAAO;MAC7B;IACJ;EACJ,CAAC;EAGD,OAAO;IAACD,cAAc,EAAdA;EAAc,CAAC;AAC3B,CAAC;AAAA,IAAAK,QAAA,GAAAC,OAAA,cAEcZ,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _useDrawHandler = _interopRequireDefault(require("./hooks/useDrawHandler"));
|
|
10
|
+
var _useTerrainClipPlan = _interopRequireDefault(require("./hooks/useTerrainClipPlan"));
|
|
11
|
+
var _excavate_bottom_min = _interopRequireDefault(require("../assets/excavate_bottom_min.png"));
|
|
12
|
+
var _excavate_kuangqu = _interopRequireDefault(require("../assets/excavate_kuangqu.png"));
|
|
13
|
+
var _useProps2 = _interopRequireDefault(require("../use-props"));
|
|
14
|
+
var _useTileSetCut = _interopRequireDefault(require("./hooks/useTileSetCut"));
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
+
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); }
|
|
17
|
+
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 && {}.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; }
|
|
18
|
+
var ExcavationAnalysis = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
19
|
+
var _useProps = (0, _useProps2["default"])(),
|
|
20
|
+
map = _useProps.map;
|
|
21
|
+
var excavateDepth = (0, _react.useRef)(30);
|
|
22
|
+
var terrainClipPlan = (0, _useTerrainClipPlan["default"])({
|
|
23
|
+
viewer: map
|
|
24
|
+
});
|
|
25
|
+
var drawHandler = (0, _useDrawHandler["default"])({
|
|
26
|
+
viewer: map,
|
|
27
|
+
type: 'polygon'
|
|
28
|
+
});
|
|
29
|
+
var tileSetCut = (0, _useTileSetCut["default"])({
|
|
30
|
+
viewer: map,
|
|
31
|
+
sceneId: props.sceneId
|
|
32
|
+
});
|
|
33
|
+
drawHandler.on('drawEnd', function (res) {
|
|
34
|
+
// 再次绘制清除之前开挖分析
|
|
35
|
+
terrainClipPlan.clear();
|
|
36
|
+
var positions = res.map(function (item) {
|
|
37
|
+
return {
|
|
38
|
+
x: item.x,
|
|
39
|
+
y: item.y,
|
|
40
|
+
z: item.z
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
positions.pop();
|
|
44
|
+
// 开挖分析
|
|
45
|
+
terrainClipPlan.start({
|
|
46
|
+
height: excavateDepth.current,
|
|
47
|
+
splitNum: 100,
|
|
48
|
+
wallImg: _excavate_kuangqu["default"],
|
|
49
|
+
bottomImg: _excavate_bottom_min["default"],
|
|
50
|
+
positions: positions
|
|
51
|
+
});
|
|
52
|
+
// 移除绘制区域
|
|
53
|
+
drawHandler.clear();
|
|
54
|
+
var cutTool = tileSetCut.loadTileSetCut();
|
|
55
|
+
if (cutTool) {
|
|
56
|
+
cutTool.addRegion({
|
|
57
|
+
positions: positions,
|
|
58
|
+
id: new Date().getTime()
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
63
|
+
return {
|
|
64
|
+
drawHandler: drawHandler,
|
|
65
|
+
terrainClipPlan: terrainClipPlan,
|
|
66
|
+
onDraw: onDraw,
|
|
67
|
+
onClear: onClear,
|
|
68
|
+
onChange: onChange
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
var onDraw = function onDraw() {
|
|
72
|
+
drawHandler.activate();
|
|
73
|
+
};
|
|
74
|
+
var onClear = function onClear() {
|
|
75
|
+
terrainClipPlan.clear();
|
|
76
|
+
};
|
|
77
|
+
var onChange = function onChange(value) {
|
|
78
|
+
excavateDepth.current = value;
|
|
79
|
+
terrainClipPlan.updateExcavateDepth(value);
|
|
80
|
+
};
|
|
81
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null);
|
|
82
|
+
});
|
|
83
|
+
var _default = exports["default"] = ExcavationAnalysis;
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_useDrawHandler","_interopRequireDefault","_useTerrainClipPlan","_excavate_bottom_min","_excavate_kuangqu","_useProps2","_useTileSetCut","obj","__esModule","_getRequireWildcardCache","e","WeakMap","r","t","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ExcavationAnalysis","forwardRef","props","ref","_useProps","useProps","map","excavateDepth","useRef","terrainClipPlan","useTerrainClipPlan","viewer","drawHandler","useDrawHandler","type","tileSetCut","useTileSetCut","sceneId","on","res","clear","positions","item","x","y","z","pop","start","height","current","splitNum","wallImg","excavate_kuangqu","bottomImg","excavate_bottom_min","cutTool","loadTileSetCut","addRegion","id","Date","getTime","useImperativeHandle","onDraw","onClear","onChange","activate","value","updateExcavateDepth","createElement","Fragment","_default","exports"],"sources":["excavation-analysis/index.js"],"sourcesContent":["import React, { useRef, useImperativeHandle, forwardRef } from 'react'\nimport useDrawHandler from './hooks/useDrawHandler'\nimport useTerrainClipPlan from './hooks/useTerrainClipPlan'\nimport excavate_bottom_min from '../assets/excavate_bottom_min.png';\nimport excavate_kuangqu from '../assets/excavate_kuangqu.png';\nimport useProps from '../use-props';\nimport useTileSetCut from \"./hooks/useTileSetCut\";\n\nconst ExcavationAnalysis = forwardRef((props, ref) => {\n const {map} = useProps();\n\n const excavateDepth = useRef(30);\n const terrainClipPlan = useTerrainClipPlan({\n viewer: map\n })\n const drawHandler = useDrawHandler({\n viewer: map,\n type: 'polygon'\n })\n\n const tileSetCut = useTileSetCut({\n viewer: map,\n sceneId: props.sceneId,\n })\n\n drawHandler.on('drawEnd', (res) => {\n // 再次绘制清除之前开挖分析\n terrainClipPlan.clear()\n\n const positions = res.map((item) => {\n return {\n x: item.x,\n y: item.y,\n z: item.z\n }\n })\n positions.pop()\n // 开挖分析\n terrainClipPlan.start({\n height: excavateDepth.current,\n splitNum: 100,\n wallImg: excavate_kuangqu,\n bottomImg: excavate_bottom_min,\n positions\n })\n // 移除绘制区域\n drawHandler.clear();\n\n let cutTool = tileSetCut.loadTileSetCut();\n if (cutTool) {\n cutTool.addRegion({\n positions : positions,\n id : new Date().getTime()\n })\n }\n })\n\n useImperativeHandle(ref, () => ({\n drawHandler,\n terrainClipPlan,\n onDraw,\n onClear,\n onChange,\n }))\n\n const onDraw = () => {\n drawHandler.activate()\n }\n\n const onClear = () => {\n terrainClipPlan.clear()\n }\n\n const onChange = (value) => {\n excavateDepth.current = value\n terrainClipPlan.updateExcavateDepth(value)\n }\n\n return <></>\n}\n)\nexport default ExcavationAnalysis;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,oBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAA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CAAC;IACzC,IAAID,OAAO,EAAE;MACTA,OAAO,CAACE,SAAS,CAAC;QACdhB,SAAS,EAAGA,SAAS;QACrBiB,EAAE,EAAG,IAAIC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC;MAC5B,CAAC,CAAC;IACN;EACJ,CAAC,CAAC;EAEF,IAAAC,0BAAmB,EAACtC,GAAG,EAAE;IAAA,OAAO;MAC5BS,WAAW,EAAXA,WAAW;MACXH,eAAe,EAAfA,eAAe;MACfiC,MAAM,EAANA,MAAM;MACNC,OAAO,EAAPA,OAAO;MACPC,QAAQ,EAARA;IACJ,CAAC;EAAA,CAAC,CAAC;EAEH,IAAMF,MAAM,GAAG,SAATA,MAAMA,CAAA,EAAS;IACjB9B,WAAW,CAACiC,QAAQ,CAAC,CAAC;EAC1B,CAAC;EAED,IAAMF,OAAO,GAAG,SAAVA,OAAOA,CAAA,EAAS;IAClBlC,eAAe,CAACW,KAAK,CAAC,CAAC;EAC3B,CAAC;EAED,IAAMwB,QAAQ,GAAG,SAAXA,QAAQA,CAAIE,KAAK,EAAK;IACxBvC,aAAa,CAACsB,OAAO,GAAGiB,KAAK;IAC7BrC,eAAe,CAACsC,mBAAmB,CAACD,KAAK,CAAC;EAC9C,CAAC;EAED,oBAAO7E,MAAA,YAAA+E,aAAA,CAAA/E,MAAA,YAAAgF,QAAA,MAAI,CAAC;AAChB,CACA,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,cACcnD,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","names":["require"],"sources":["excavation-analysis/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA","ignoreList":[]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["require"],"sources":["excavation-analysis/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA","ignoreList":[]}
|
|
File without changes
|
|
@@ -25,18 +25,18 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
25
25
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26
26
|
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); } }
|
|
27
27
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
28
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
29
|
+
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); }
|
|
30
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
32
|
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
29
33
|
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
34
|
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
35
|
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
|
36
36
|
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new TypeError('failed to set property'); } return value; }
|
|
37
37
|
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; }
|
|
38
|
-
function _toPropertyKey(
|
|
39
|
-
function _toPrimitive(
|
|
38
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
39
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
40
40
|
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
41
41
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
42
42
|
var P = {
|
|
@@ -60,10 +60,8 @@ var createFeature = function createFeature(v) {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
var FeatureLayer = /*#__PURE__*/function (_CustomDataSource) {
|
|
63
|
-
_inherits(FeatureLayer, _CustomDataSource);
|
|
64
|
-
var _super = _createSuper(FeatureLayer);
|
|
65
63
|
function FeatureLayer(opt_options) {
|
|
66
|
-
var
|
|
64
|
+
var _this2;
|
|
67
65
|
_classCallCheck(this, FeatureLayer);
|
|
68
66
|
var options = opt_options || {};
|
|
69
67
|
var url = options.url,
|
|
@@ -109,8 +107,8 @@ var FeatureLayer = /*#__PURE__*/function (_CustomDataSource) {
|
|
|
109
107
|
});
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
|
-
_this2 =
|
|
113
|
-
_set((
|
|
110
|
+
_this2 = _callSuper(this, FeatureLayer, [options]);
|
|
111
|
+
_set((_this2, _getPrototypeOf(FeatureLayer.prototype)), "show", show, _this2, true);
|
|
114
112
|
|
|
115
113
|
// 接口地址
|
|
116
114
|
_this2.url = url;
|
|
@@ -192,7 +190,8 @@ var FeatureLayer = /*#__PURE__*/function (_CustomDataSource) {
|
|
|
192
190
|
}
|
|
193
191
|
|
|
194
192
|
// 重写父类的属性访问器
|
|
195
|
-
|
|
193
|
+
_inherits(FeatureLayer, _CustomDataSource);
|
|
194
|
+
return _createClass(FeatureLayer, [{
|
|
196
195
|
key: "show",
|
|
197
196
|
get: function get() {
|
|
198
197
|
return _get(_getPrototypeOf(FeatureLayer.prototype), "show", this);
|
|
@@ -620,7 +619,6 @@ var FeatureLayer = /*#__PURE__*/function (_CustomDataSource) {
|
|
|
620
619
|
}
|
|
621
620
|
}
|
|
622
621
|
}]);
|
|
623
|
-
return FeatureLayer;
|
|
624
622
|
}(_cesium.CustomDataSource);
|
|
625
623
|
var _default = exports["default"] = FeatureLayer;
|
|
626
624
|
//# sourceMappingURL=FeatureLayer.js.map
|