leiting-bim 2.1.36 → 2.1.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/leiting-bim.es.js +1 -1
- package/leiting-bim.umd.js +11 -11
- package/leitingbim.css +1 -1
- package/package.json +1 -1
- package/plugins/.gitmodules +4 -0
- package/plugins/README.md +2 -0
- package/plugins/build.cjs +63 -0
- package/plugins/cesium-core/dist/cesium-core.mjs +6217 -0
- package/plugins/cesium-core/dist/cesium-core.umd.js +76 -0
- package/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +73 -0
- package/plugins/cesium-core/dist/components/HtmlOverlayLabelPool.d.ts +152 -0
- package/plugins/cesium-core/dist/components/MarkerEvent.d.ts +38 -0
- package/plugins/cesium-core/dist/components/Material/MaterialManager.d.ts +49 -0
- package/plugins/cesium-core/dist/components/Material/help/PolylineFlowMaterialProperty.d.ts +10 -0
- package/plugins/cesium-core/dist/components/Material/help/dynamicImgMaterial.d.ts +16 -0
- package/plugins/cesium-core/dist/components/Material/index.d.ts +3 -0
- package/plugins/cesium-core/dist/components/TooltipManager.d.ts +11 -0
- package/plugins/cesium-core/dist/components/draw/DrawTool.d.ts +10 -0
- package/plugins/cesium-core/dist/components/draw/handlers/CircleDrawer.d.ts +16 -0
- package/plugins/cesium-core/dist/components/draw/handlers/LineDrawer.d.ts +14 -0
- package/plugins/cesium-core/dist/components/draw/handlers/PointDrawer.d.ts +12 -0
- package/plugins/cesium-core/dist/components/draw/handlers/PolygonDrawer.d.ts +14 -0
- package/plugins/cesium-core/dist/components/draw/handlers/RectangleDrawer.d.ts +13 -0
- package/plugins/cesium-core/dist/components/draw/types.d.ts +29 -0
- package/plugins/cesium-core/dist/components/entity/EntityLayer.d.ts +65 -0
- package/plugins/cesium-core/dist/components/gltf/GLTFManage.d.ts +141 -0
- package/plugins/cesium-core/dist/components/gltf/index.d.ts +1 -0
- package/plugins/cesium-core/dist/components/measurement/MeasurementTool.d.ts +34 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/AreaMeasure.d.ts +28 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/CircleMeasure.d.ts +22 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/CoordinateMeasure.d.ts +16 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/HorizontalMeasure.d.ts +27 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/PolylineDistanceMeasure.d.ts +25 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/RectangleMeasure.d.ts +30 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/RegularPolygonMeasure.d.ts +28 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/SpaceMeasure.d.ts +21 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/TerrainHeightMeasure.d.ts +18 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/TriangleMeasure.d.ts +30 -0
- package/plugins/cesium-core/dist/components/measurement/handlers/VerticalMeasure.d.ts +23 -0
- package/plugins/cesium-core/dist/components/measurement/index.d.ts +13 -0
- package/plugins/cesium-core/dist/components/measurement/types.d.ts +42 -0
- package/plugins/cesium-core/dist/components/primitive/PrimitiveManager.d.ts +50 -0
- package/plugins/cesium-core/dist/components/roaming/CameraRoamTool.d.ts +27 -0
- package/plugins/cesium-core/dist/components/roaming/PathRoamTool.d.ts +23 -0
- package/plugins/cesium-core/dist/components/roaming/index.d.ts +3 -0
- package/plugins/cesium-core/dist/components/roaming/types.d.ts +66 -0
- package/plugins/cesium-core/dist/components/utils/convertGeoJsonToEntityData.d.ts +1 -0
- package/plugins/cesium-core/dist/components/utils/uuid.d.ts +1 -0
- package/plugins/cesium-core/dist/index.d.ts +12 -0
- package/plugins/cesium-core/package.json +27 -0
- package/plugins/cesium-core/pnpm-lock.yaml +872 -0
- package/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +546 -0
- package/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +489 -0
- package/plugins/cesium-core/src/components/MarkerEvent.ts +92 -0
- package/plugins/cesium-core/src/components/Material/MaterialManager.ts +129 -0
- package/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +116 -0
- package/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +236 -0
- package/plugins/cesium-core/src/components/Material/index.ts +3 -0
- package/plugins/cesium-core/src/components/TooltipManager.ts +52 -0
- package/plugins/cesium-core/src/components/draw/DrawTool.ts +55 -0
- package/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +159 -0
- package/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +113 -0
- package/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +70 -0
- package/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +112 -0
- package/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +115 -0
- package/plugins/cesium-core/src/components/draw/types.ts +28 -0
- package/plugins/cesium-core/src/components/entity/EntityLayer.ts +453 -0
- package/plugins/cesium-core/src/components/gltf/GLTFManage.ts +799 -0
- package/plugins/cesium-core/src/components/gltf/index.ts +1 -0
- package/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +416 -0
- package/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +552 -0
- package/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +289 -0
- package/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +139 -0
- package/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +427 -0
- package/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +356 -0
- package/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +516 -0
- package/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +472 -0
- package/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +250 -0
- package/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +185 -0
- package/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +561 -0
- package/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +361 -0
- package/plugins/cesium-core/src/components/measurement/index.ts +13 -0
- package/plugins/cesium-core/src/components/measurement/types.ts +57 -0
- package/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +556 -0
- package/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +286 -0
- package/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +174 -0
- package/plugins/cesium-core/src/components/roaming/index.ts +3 -0
- package/plugins/cesium-core/src/components/roaming/types.ts +71 -0
- package/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +98 -0
- package/plugins/cesium-core/src/components/utils/uuid.ts +7 -0
- package/plugins/cesium-core/src/index.ts +17 -0
- package/plugins/cesium-core/src/test/measurement/index.html +166 -0
- package/plugins/cesium-core/src/test/roaming/c.gltf +1 -0
- package/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
- package/plugins/cesium-core/src/test/roaming/index.html +51 -0
- package/plugins/cesium-core/src/test/roaming/path.html +448 -0
- package/plugins/cesium-core/src/test/roaming/view.html +520 -0
- package/plugins/cesium-core/stats.html +4949 -0
- package/plugins/cesium-core/tsconfig.json +14 -0
- package/plugins/cesium-core/vite.config.ts +35 -0
- package/plugins/cesium-vue/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/plugins/cesium-vue/dist/components/basic-audio/index.d.ts +13 -0
- package/plugins/cesium-vue/dist/components/basic-audio.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/basic-audio.js +1295 -0
- package/plugins/cesium-vue/dist/components/basic-video/index.d.ts +98 -0
- package/plugins/cesium-vue/dist/components/basic-video.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/basic-video.js +67 -0
- package/plugins/cesium-vue/dist/components/card-carousel/index.d.ts +147 -0
- package/plugins/cesium-vue/dist/components/card-carousel.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/card-carousel.js +143 -0
- package/plugins/cesium-vue/dist/components/card-content/index.d.ts +16 -0
- package/plugins/cesium-vue/dist/components/card-content.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/card-content.js +74 -0
- package/plugins/cesium-vue/dist/components/card-page/index.d.ts +64 -0
- package/plugins/cesium-vue/dist/components/card-page.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/card-page.js +111 -0
- package/plugins/cesium-vue/dist/components/carousel-img/index.d.ts +34 -0
- package/plugins/cesium-vue/dist/components/carousel-img.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/carousel-img.js +72 -0
- package/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts +63 -0
- package/plugins/cesium-vue/dist/components/echarts-pro.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/echarts-pro.js +7 -0
- package/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts +73 -0
- package/plugins/cesium-vue/dist/components/marker-bubble.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/marker-bubble.js +123 -0
- package/plugins/cesium-vue/dist/components/marker-default/index.d.ts +43 -0
- package/plugins/cesium-vue/dist/components/marker-default.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/marker-default.js +39 -0
- package/plugins/cesium-vue/dist/components/marker-html/index.d.ts +43 -0
- package/plugins/cesium-vue/dist/components/marker-html.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/marker-html.js +40 -0
- package/plugins/cesium-vue/dist/components/marker-manage/index.d.ts +159 -0
- package/plugins/cesium-vue/dist/components/marker-manage.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/marker-manage.js +896 -0
- package/plugins/cesium-vue/dist/components/marker-text/index.d.ts +25 -0
- package/plugins/cesium-vue/dist/components/marker-text.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/marker-text.js +30 -0
- package/plugins/cesium-vue/dist/components/measurement/index.d.ts +73 -0
- package/plugins/cesium-vue/dist/components/measurement.d.ts +6 -0
- package/plugins/cesium-vue/dist/components/measurement.js +170 -0
- package/plugins/cesium-vue/dist/create-DynflqE1.js +31 -0
- package/plugins/cesium-vue/dist/index-B03tSn8_.js +45855 -0
- package/plugins/cesium-vue/dist/index-CUs_hd1V.js +403 -0
- package/plugins/cesium-vue/dist/index.d.ts +44 -0
- package/plugins/cesium-vue/dist/index.js +82 -0
- package/plugins/cesium-vue/package.json +106 -0
- package/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
- package/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
- package/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
- package/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
- package/plugins/cesium-vue/src/components/basic-audio/index.ts +6 -0
- package/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +119 -0
- package/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +6 -0
- package/plugins/cesium-vue/src/components/basic-video/index.ts +7 -0
- package/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +58 -0
- package/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +14 -0
- package/plugins/cesium-vue/src/components/card-carousel/index.ts +7 -0
- package/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +124 -0
- package/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +60 -0
- package/plugins/cesium-vue/src/components/card-content/index.ts +7 -0
- package/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +41 -0
- package/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +22 -0
- package/plugins/cesium-vue/src/components/card-page/index.ts +7 -0
- package/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +102 -0
- package/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +37 -0
- package/plugins/cesium-vue/src/components/carousel-img/index.ts +7 -0
- package/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +84 -0
- package/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +8 -0
- package/plugins/cesium-vue/src/components/echarts-pro/index.ts +7 -0
- package/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +107 -0
- package/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +12 -0
- package/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +55 -0
- package/plugins/cesium-vue/src/components/marker-bubble/index.ts +7 -0
- package/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +235 -0
- package/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +35 -0
- package/plugins/cesium-vue/src/components/marker-default/index.ts +7 -0
- package/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +19 -0
- package/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +12 -0
- package/plugins/cesium-vue/src/components/marker-html/index.ts +7 -0
- package/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +21 -0
- package/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +12 -0
- package/plugins/cesium-vue/src/components/marker-manage/index.ts +9 -0
- package/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +106 -0
- package/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +8 -0
- package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +466 -0
- package/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +148 -0
- package/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +45 -0
- package/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +75 -0
- package/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +154 -0
- package/plugins/cesium-vue/src/components/marker-text/index.ts +7 -0
- package/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +14 -0
- package/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +10 -0
- package/plugins/cesium-vue/src/components/measurement/index.ts +7 -0
- package/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +183 -0
- package/plugins/cesium-vue/src/components/measurement/src/measurement.ts +20 -0
- package/plugins/cesium-vue/src/index.ts +89 -0
- package/plugins/cesium-vue/stats.html +4949 -0
- package/plugins/cesium-vue/tsconfig.json +18 -0
- package/plugins/cesium-vue/vite.config.ts +62 -0
- package/plugins/plugins/README.md +2 -0
- package/plugins/plugins/build.cjs +63 -0
- package/plugins/plugins/cesium-core/dist/cesium-core.mjs +5881 -0
- package/plugins/plugins/cesium-core/dist/cesium-core.mjs.map +1 -0
- package/plugins/plugins/cesium-core/dist/cesium-core.umd.js +77 -0
- package/plugins/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -0
- package/plugins/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +73 -0
- package/plugins/plugins/cesium-core/dist/components/HtmlOverlayLabelPool.d.ts +152 -0
- package/plugins/plugins/cesium-core/dist/components/MarkerEvent.d.ts +38 -0
- package/plugins/plugins/cesium-core/dist/components/Material/MaterialManager.d.ts +49 -0
- package/plugins/plugins/cesium-core/dist/components/Material/help/PolylineFlowMaterialProperty.d.ts +10 -0
- package/plugins/plugins/cesium-core/dist/components/Material/help/dynamicImgMaterial.d.ts +16 -0
- package/plugins/plugins/cesium-core/dist/components/Material/index.d.ts +3 -0
- package/plugins/plugins/cesium-core/dist/components/TooltipManager.d.ts +11 -0
- package/plugins/plugins/cesium-core/dist/components/draw/DrawTool.d.ts +10 -0
- package/plugins/plugins/cesium-core/dist/components/draw/handlers/CircleDrawer.d.ts +16 -0
- package/plugins/plugins/cesium-core/dist/components/draw/handlers/LineDrawer.d.ts +14 -0
- package/plugins/plugins/cesium-core/dist/components/draw/handlers/PointDrawer.d.ts +12 -0
- package/plugins/plugins/cesium-core/dist/components/draw/handlers/PolygonDrawer.d.ts +14 -0
- package/plugins/plugins/cesium-core/dist/components/draw/handlers/RectangleDrawer.d.ts +13 -0
- package/plugins/plugins/cesium-core/dist/components/draw/types.d.ts +29 -0
- package/plugins/plugins/cesium-core/dist/components/entity/EntityLayer.d.ts +65 -0
- package/plugins/plugins/cesium-core/dist/components/gltf/GLTFManage.d.ts +141 -0
- package/plugins/plugins/cesium-core/dist/components/gltf/index.d.ts +1 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/MeasurementTool.d.ts +34 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/AreaMeasure.d.ts +23 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CircleMeasure.d.ts +21 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/CoordinateMeasure.d.ts +16 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/HorizontalMeasure.d.ts +25 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/PolylineDistanceMeasure.d.ts +24 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RectangleMeasure.d.ts +22 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/RegularPolygonMeasure.d.ts +23 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/SpaceMeasure.d.ts +20 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TerrainHeightMeasure.d.ts +18 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/TriangleMeasure.d.ts +24 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/handlers/VerticalMeasure.d.ts +23 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/index.d.ts +13 -0
- package/plugins/plugins/cesium-core/dist/components/measurement/types.d.ts +42 -0
- package/plugins/plugins/cesium-core/dist/components/primitive/PrimitiveManager.d.ts +50 -0
- package/plugins/plugins/cesium-core/dist/components/roaming/CameraRoamTool.d.ts +27 -0
- package/plugins/plugins/cesium-core/dist/components/roaming/PathRoamTool.d.ts +23 -0
- package/plugins/plugins/cesium-core/dist/components/roaming/index.d.ts +3 -0
- package/plugins/plugins/cesium-core/dist/components/roaming/types.d.ts +66 -0
- package/plugins/plugins/cesium-core/dist/components/utils/convertGeoJsonToEntityData.d.ts +1 -0
- package/plugins/plugins/cesium-core/dist/components/utils/uuid.d.ts +1 -0
- package/plugins/plugins/cesium-core/dist/index.d.ts +12 -0
- package/plugins/plugins/cesium-core/package.json +26 -0
- package/plugins/plugins/cesium-core/pnpm-lock.yaml +872 -0
- package/plugins/plugins/cesium-core/src/components/BufferedHierarchicalAggregator.ts +546 -0
- package/plugins/plugins/cesium-core/src/components/HtmlOverlayLabelPool.ts +489 -0
- package/plugins/plugins/cesium-core/src/components/MarkerEvent.ts +92 -0
- package/plugins/plugins/cesium-core/src/components/Material/MaterialManager.ts +129 -0
- package/plugins/plugins/cesium-core/src/components/Material/help/PolylineFlowMaterialProperty.ts +116 -0
- package/plugins/plugins/cesium-core/src/components/Material/help/dynamicImgMaterial.ts +236 -0
- package/plugins/plugins/cesium-core/src/components/Material/index.ts +3 -0
- package/plugins/plugins/cesium-core/src/components/TooltipManager.ts +52 -0
- package/plugins/plugins/cesium-core/src/components/draw/DrawTool.ts +55 -0
- package/plugins/plugins/cesium-core/src/components/draw/handlers/CircleDrawer.ts +159 -0
- package/plugins/plugins/cesium-core/src/components/draw/handlers/LineDrawer.ts +113 -0
- package/plugins/plugins/cesium-core/src/components/draw/handlers/PointDrawer.ts +70 -0
- package/plugins/plugins/cesium-core/src/components/draw/handlers/PolygonDrawer.ts +112 -0
- package/plugins/plugins/cesium-core/src/components/draw/handlers/RectangleDrawer.ts +115 -0
- package/plugins/plugins/cesium-core/src/components/draw/types.ts +28 -0
- package/plugins/plugins/cesium-core/src/components/entity/EntityLayer.ts +453 -0
- package/plugins/plugins/cesium-core/src/components/gltf/GLTFManage.ts +799 -0
- package/plugins/plugins/cesium-core/src/components/gltf/index.ts +1 -0
- package/plugins/plugins/cesium-core/src/components/measurement/MeasurementTool.ts +416 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/AreaMeasure.ts +451 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/CircleMeasure.ts +267 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/CoordinateMeasure.ts +139 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/HorizontalMeasure.ts +418 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/PolylineDistanceMeasure.ts +352 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/RectangleMeasure.ts +388 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/RegularPolygonMeasure.ts +379 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/SpaceMeasure.ts +246 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/TerrainHeightMeasure.ts +185 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/TriangleMeasure.ts +541 -0
- package/plugins/plugins/cesium-core/src/components/measurement/handlers/VerticalMeasure.ts +360 -0
- package/plugins/plugins/cesium-core/src/components/measurement/index.ts +13 -0
- package/plugins/plugins/cesium-core/src/components/measurement/types.ts +57 -0
- package/plugins/plugins/cesium-core/src/components/primitive/PrimitiveManager.ts +556 -0
- package/plugins/plugins/cesium-core/src/components/roaming/CameraRoamTool.ts +286 -0
- package/plugins/plugins/cesium-core/src/components/roaming/PathRoamTool.ts +174 -0
- package/plugins/plugins/cesium-core/src/components/roaming/index.ts +3 -0
- package/plugins/plugins/cesium-core/src/components/roaming/types.ts +71 -0
- package/plugins/plugins/cesium-core/src/components/utils/convertGeoJsonToEntityData.ts +98 -0
- package/plugins/plugins/cesium-core/src/components/utils/uuid.ts +7 -0
- package/plugins/plugins/cesium-core/src/index.ts +17 -0
- package/plugins/plugins/cesium-core/src/test/measurement/index.html +166 -0
- package/plugins/plugins/cesium-core/src/test/roaming/c.gltf +1 -0
- package/plugins/plugins/cesium-core/src/test/roaming/f87cc3ea918a4b76bff2c88a3655eb1f.bin +0 -0
- package/plugins/plugins/cesium-core/src/test/roaming/index.html +51 -0
- package/plugins/plugins/cesium-core/src/test/roaming/path.html +448 -0
- package/plugins/plugins/cesium-core/src/test/roaming/view.html +520 -0
- package/plugins/plugins/cesium-core/stats.html +4949 -0
- package/plugins/plugins/cesium-core/tsconfig.json +14 -0
- package/plugins/plugins/cesium-core/vite.config.ts +35 -0
- package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts +18 -0
- package/plugins/plugins/cesium-vue/dist/components/basic-audio/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts +92 -0
- package/plugins/plugins/cesium-vue/dist/components/basic-video/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts +82 -0
- package/plugins/plugins/cesium-vue/dist/components/camera-roam/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts +152 -0
- package/plugins/plugins/cesium-vue/dist/components/card-carousel/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts +21 -0
- package/plugins/plugins/cesium-vue/dist/components/card-content/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts +69 -0
- package/plugins/plugins/cesium-vue/dist/components/card-page/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts +21 -0
- package/plugins/plugins/cesium-vue/dist/components/carousel-img/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts +68 -0
- package/plugins/plugins/cesium-vue/dist/components/echarts-pro/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts +78 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-bubble/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts +48 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-default/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts +48 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-html/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts +164 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-manage/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts +30 -0
- package/plugins/plugins/cesium-vue/dist/components/marker-text/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts +78 -0
- package/plugins/plugins/cesium-vue/dist/components/measurement/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts +82 -0
- package/plugins/plugins/cesium-vue/dist/components/path-roam/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts +67 -0
- package/plugins/plugins/cesium-vue/dist/components/test/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/index.css +1 -0
- package/plugins/plugins/cesium-vue/dist/index.d.ts +30 -0
- package/plugins/plugins/cesium-vue/dist/index.d.ts.map +1 -0
- package/plugins/plugins/cesium-vue/dist/index.js +10087 -0
- package/plugins/plugins/cesium-vue/dist/index.js.map +1 -0
- package/plugins/plugins/cesium-vue/dist/index.umd.cjs +46 -0
- package/plugins/plugins/cesium-vue/dist/index.umd.cjs.map +1 -0
- package/plugins/plugins/cesium-vue/package.json +48 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-001.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-002.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-003.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-004.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-005.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-006.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-007.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-008.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-009.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-010.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-011.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/icons/icon-012.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/img/Card3-BG.png +0 -0
- package/plugins/plugins/cesium-vue/src/assets/img/card_bg3.png +0 -0
- package/plugins/plugins/cesium-vue/src/components/basic-audio/index.ts +11 -0
- package/plugins/plugins/cesium-vue/src/components/basic-audio/src/BasicAudio.vue +110 -0
- package/plugins/plugins/cesium-vue/src/components/basic-audio/src/basicAudio.ts +6 -0
- package/plugins/plugins/cesium-vue/src/components/basic-video/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/basic-video/src/BasicVideo.vue +99 -0
- package/plugins/plugins/cesium-vue/src/components/basic-video/src/basicVideo.ts +13 -0
- package/plugins/plugins/cesium-vue/src/components/camera-roam/index.ts +4 -0
- package/plugins/plugins/cesium-vue/src/components/camera-roam/src/CameraRoam.vue +434 -0
- package/plugins/plugins/cesium-vue/src/components/camera-roam/src/cameraRoam.ts +28 -0
- package/plugins/plugins/cesium-vue/src/components/card-carousel/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/card-carousel/src/CardCarousel.vue +124 -0
- package/plugins/plugins/cesium-vue/src/components/card-carousel/src/cardCarousel.ts +60 -0
- package/plugins/plugins/cesium-vue/src/components/card-content/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/card-content/src/CardContent.vue +41 -0
- package/plugins/plugins/cesium-vue/src/components/card-content/src/cardContent.ts +22 -0
- package/plugins/plugins/cesium-vue/src/components/card-page/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/card-page/src/CardPage.vue +102 -0
- package/plugins/plugins/cesium-vue/src/components/card-page/src/cardPage.ts +37 -0
- package/plugins/plugins/cesium-vue/src/components/carousel-img/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/carousel-img/src/CarouselImg.vue +15 -0
- package/plugins/plugins/cesium-vue/src/components/carousel-img/src/carouselImg.ts +6 -0
- package/plugins/plugins/cesium-vue/src/components/echarts-pro/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/EchartsPro.vue +107 -0
- package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/echartsPro.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/echarts-pro/src/hook/useECharts.ts +55 -0
- package/plugins/plugins/cesium-vue/src/components/marker-bubble/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/MarkerBubble.vue +235 -0
- package/plugins/plugins/cesium-vue/src/components/marker-bubble/src/markerBubble.ts +35 -0
- package/plugins/plugins/cesium-vue/src/components/marker-default/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/marker-default/src/MarkerDefault.vue +19 -0
- package/plugins/plugins/cesium-vue/src/components/marker-default/src/markerDefault.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/marker-html/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/marker-html/src/MarkerHtml.vue +21 -0
- package/plugins/plugins/cesium-vue/src/components/marker-html/src/markerHtml.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/index.ts +14 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/src/components/MarkerManage.vue +106 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/src/config/theme.ts +8 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManage.ts +466 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/src/core/MarkerManagerCore.ts +148 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/src/hook/useMarkerManage.ts +45 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/src/type/markerManage.ts +75 -0
- package/plugins/plugins/cesium-vue/src/components/marker-manage/src/utils/themeTool.ts +154 -0
- package/plugins/plugins/cesium-vue/src/components/marker-text/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/marker-text/src/MarkerText.vue +14 -0
- package/plugins/plugins/cesium-vue/src/components/marker-text/src/markerText.ts +10 -0
- package/plugins/plugins/cesium-vue/src/components/measurement/index.ts +12 -0
- package/plugins/plugins/cesium-vue/src/components/measurement/src/Measurement.vue +183 -0
- package/plugins/plugins/cesium-vue/src/components/measurement/src/measurement.ts +20 -0
- package/plugins/plugins/cesium-vue/src/components/path-roam/index.ts +4 -0
- package/plugins/plugins/cesium-vue/src/components/path-roam/src/PathRoam.vue +429 -0
- package/plugins/plugins/cesium-vue/src/components/path-roam/src/pathRoam.ts +28 -0
- package/plugins/plugins/cesium-vue/src/components/test/CardMarker.vue +150 -0
- package/plugins/plugins/cesium-vue/src/components/test/CesiumMarker.vue +34 -0
- package/plugins/plugins/cesium-vue/src/components/test/CesiumViewer.vue +77 -0
- package/plugins/plugins/cesium-vue/src/components/test/MyLabel.vue +25 -0
- package/plugins/plugins/cesium-vue/src/components/test/index.ts +28 -0
- package/plugins/plugins/cesium-vue/src/index.ts +83 -0
- package/plugins/plugins/cesium-vue/stats.html +4949 -0
- package/plugins/plugins/cesium-vue/tsconfig.json +18 -0
- package/plugins/plugins/cesium-vue/vite.config.ts +56 -0
- package/plugins/plugins/theme-chalk/dist/theme-chalk.css +819 -0
- package/plugins/plugins/theme-chalk/index.less +11 -0
- package/plugins/plugins/theme-chalk/package.json +27 -0
- package/plugins/plugins/theme-chalk/src/basicAudio.less +41 -0
- package/plugins/plugins/theme-chalk/src/basicVideo.less +17 -0
- package/plugins/plugins/theme-chalk/src/cameraRoam.less +239 -0
- package/plugins/plugins/theme-chalk/src/cardCarousel.less +71 -0
- package/plugins/plugins/theme-chalk/src/cardContent.less +73 -0
- package/plugins/plugins/theme-chalk/src/cardPage.less +61 -0
- package/plugins/plugins/theme-chalk/src/carouselImg.less +34 -0
- package/plugins/plugins/theme-chalk/src/marker.less +107 -0
- package/plugins/plugins/theme-chalk/src/markerManage.less +25 -0
- package/plugins/plugins/theme-chalk/src/measurement.less +106 -0
- package/plugins/plugins/theme-chalk/src/mixins/config.less +4 -0
- package/plugins/plugins/theme-chalk/src/mixins/mixins.less +64 -0
- package/plugins/plugins/theme-chalk/src/pathRoam.less +198 -0
- package/plugins/plugins/utils/create.ts +45 -0
- package/plugins/plugins/utils/package.json +12 -0
- package/plugins/plugins/utils/uuid.ts +43 -0
- package/plugins/plugins/utils/with-install.ts +10 -0
- package/plugins/theme-chalk/dist/theme-chalk.css +852 -0
- package/plugins/theme-chalk/index.less +11 -0
- package/plugins/theme-chalk/package.json +27 -0
- package/plugins/theme-chalk/src/basicAudio.less +44 -0
- package/plugins/theme-chalk/src/basicVideo.less +17 -0
- package/plugins/theme-chalk/src/cameraRoam.less +239 -0
- package/plugins/theme-chalk/src/cardCarousel.less +71 -0
- package/plugins/theme-chalk/src/cardContent.less +73 -0
- package/plugins/theme-chalk/src/cardPage.less +61 -0
- package/plugins/theme-chalk/src/carouselImg.less +66 -0
- package/plugins/theme-chalk/src/marker.less +107 -0
- package/plugins/theme-chalk/src/markerManage.less +25 -0
- package/plugins/theme-chalk/src/measurement.less +106 -0
- package/plugins/theme-chalk/src/mixins/config.less +4 -0
- package/plugins/theme-chalk/src/mixins/mixins.less +64 -0
- package/plugins/theme-chalk/src/pathRoam.less +198 -0
- package/plugins/utils/create.ts +45 -0
- package/plugins/utils/package.json +12 -0
- package/plugins/utils/uuid.ts +43 -0
- package/plugins/utils/with-install.ts +10 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GLTFManage';
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IMeasure,
|
|
3
|
+
MeasurementOptions,
|
|
4
|
+
MeasurementType,
|
|
5
|
+
MeasurementRecord,
|
|
6
|
+
MeasurementsConfig,
|
|
7
|
+
} from './types';
|
|
8
|
+
import HorizontalMeasure from './handlers/HorizontalMeasure';
|
|
9
|
+
import VerticalMeasure from './handlers/VerticalMeasure';
|
|
10
|
+
import TriangleMeasure from './handlers/TriangleMeasure';
|
|
11
|
+
import SpaceMeasure from './handlers/SpaceMeasure';
|
|
12
|
+
import AreaMeasure from './handlers/AreaMeasure';
|
|
13
|
+
import CircleMeasure from './handlers/CircleMeasure';
|
|
14
|
+
import PolylineDistanceMeasure from './handlers/PolylineDistanceMeasure';
|
|
15
|
+
import TerrainHeightMeasure from './handlers/TerrainHeightMeasure';
|
|
16
|
+
import CoordinateMeasure from './handlers/CoordinateMeasure';
|
|
17
|
+
import RectangleMeasure from './handlers/RectangleMeasure';
|
|
18
|
+
import RegularPolygonMeasure from './handlers/RegularPolygonMeasure';
|
|
19
|
+
import { HtmlOverlayLabelPool } from '../HtmlOverlayLabelPool';
|
|
20
|
+
import { MarkerEventKey } from '../MarkerEvent';
|
|
21
|
+
|
|
22
|
+
export class MeasurementTool {
|
|
23
|
+
private Cesium: any;
|
|
24
|
+
private viewer: any;
|
|
25
|
+
private actives: IMeasure[] = [];
|
|
26
|
+
private measurements: MeasurementRecord[] = [];
|
|
27
|
+
private htmlLabelPool: any = null;
|
|
28
|
+
private recordHandlers: Map<string, IMeasure> = new Map();
|
|
29
|
+
private specifiedClear: boolean = false;
|
|
30
|
+
private deleteLabelPool: HtmlOverlayLabelPool | null = null;
|
|
31
|
+
private deleteLabelIds: Map<string, string> = new Map();
|
|
32
|
+
|
|
33
|
+
constructor({ Cesium, viewer }: { Cesium: any; viewer: any }) {
|
|
34
|
+
this.Cesium = Cesium;
|
|
35
|
+
this.viewer = viewer;
|
|
36
|
+
viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
measure(type: MeasurementType, options: MeasurementOptions) {
|
|
40
|
+
let handler: IMeasure | null = null;
|
|
41
|
+
switch (type) {
|
|
42
|
+
case 'horizontal':
|
|
43
|
+
handler = new HorizontalMeasure(this.Cesium, this.viewer);
|
|
44
|
+
break;
|
|
45
|
+
case 'vertical':
|
|
46
|
+
handler = new VerticalMeasure(this.Cesium, this.viewer);
|
|
47
|
+
break;
|
|
48
|
+
case 'triangle':
|
|
49
|
+
handler = new TriangleMeasure(this.Cesium, this.viewer);
|
|
50
|
+
break;
|
|
51
|
+
case 'space':
|
|
52
|
+
handler = new SpaceMeasure(this.Cesium, this.viewer);
|
|
53
|
+
break;
|
|
54
|
+
case 'area':
|
|
55
|
+
handler = new AreaMeasure(this.Cesium, this.viewer);
|
|
56
|
+
break;
|
|
57
|
+
case 'circle':
|
|
58
|
+
handler = new CircleMeasure(this.Cesium, this.viewer);
|
|
59
|
+
break;
|
|
60
|
+
case 'polyline':
|
|
61
|
+
handler = new PolylineDistanceMeasure(this.Cesium, this.viewer);
|
|
62
|
+
break;
|
|
63
|
+
case 'terrainHeight':
|
|
64
|
+
handler = new TerrainHeightMeasure(this.Cesium, this.viewer);
|
|
65
|
+
break;
|
|
66
|
+
case 'coordinate':
|
|
67
|
+
handler = new CoordinateMeasure(this.Cesium, this.viewer);
|
|
68
|
+
break;
|
|
69
|
+
case 'rectangle':
|
|
70
|
+
handler = new RectangleMeasure(this.Cesium, this.viewer);
|
|
71
|
+
break;
|
|
72
|
+
case 'regularPolygon':
|
|
73
|
+
handler = new RegularPolygonMeasure(this.Cesium, this.viewer);
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
throw new Error(`Unsupported measurement type: ${type}`);
|
|
77
|
+
}
|
|
78
|
+
if (!handler) return;
|
|
79
|
+
this.actives.push(handler);
|
|
80
|
+
const currentHandler = handler;
|
|
81
|
+
const wrapped: MeasurementOptions = {
|
|
82
|
+
...options,
|
|
83
|
+
onComplete: (result: any) => {
|
|
84
|
+
const record: MeasurementRecord = {
|
|
85
|
+
id: `m_${Date.now()}_${this.measurements.length}`,
|
|
86
|
+
type,
|
|
87
|
+
options: (() => {
|
|
88
|
+
const o: any = { ...options };
|
|
89
|
+
if ('onComplete' in o) {
|
|
90
|
+
delete o.onComplete;
|
|
91
|
+
}
|
|
92
|
+
return o;
|
|
93
|
+
})(),
|
|
94
|
+
positions: (() => {
|
|
95
|
+
if (Array.isArray(result?.positions)) {
|
|
96
|
+
return result.positions.map((p: any) => [p.x, p.y, p.z]);
|
|
97
|
+
}
|
|
98
|
+
switch (type) {
|
|
99
|
+
case 'terrainHeight': {
|
|
100
|
+
const pos = (result as any)?.position;
|
|
101
|
+
if (pos) return [[pos.x, pos.y, pos.z]];
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
case 'coordinate': {
|
|
105
|
+
const ll = (result as any)?.lnglat;
|
|
106
|
+
if (ll && typeof ll.lng === 'number' && typeof ll.lat === 'number') {
|
|
107
|
+
const c = this.Cesium.Cartesian3.fromDegrees(ll.lng, ll.lat, ll.height || 0);
|
|
108
|
+
return [[c.x, c.y, c.z]];
|
|
109
|
+
}
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
default:
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
})(),
|
|
116
|
+
data: this._serializeMetrics(type, result),
|
|
117
|
+
};
|
|
118
|
+
this.measurements.push(record);
|
|
119
|
+
if (currentHandler) {
|
|
120
|
+
this.recordHandlers.set(record.id, currentHandler);
|
|
121
|
+
}
|
|
122
|
+
if (this.specifiedClear) {
|
|
123
|
+
this._showDeleteLabels('html-label-container');
|
|
124
|
+
}
|
|
125
|
+
options.onComplete?.(result);
|
|
126
|
+
const idx = this.actives.indexOf(currentHandler);
|
|
127
|
+
if (idx >= 0) this.actives.splice(idx, 1);
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
handler.start(wrapped);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
clear() {
|
|
134
|
+
const h = this.actives.pop();
|
|
135
|
+
if (h) h.clear();
|
|
136
|
+
this._removeAllDeleteLabels();
|
|
137
|
+
this.specifiedClear = false;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
cancel() {
|
|
141
|
+
const h = this.actives.pop();
|
|
142
|
+
if (h) h.stop();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
disableDefaultSelection({ disableLeftClick = false, disableDoubleClick = true } = {}) {
|
|
146
|
+
const handler = this.viewer?.cesiumWidget?.screenSpaceEventHandler;
|
|
147
|
+
if (!handler) return;
|
|
148
|
+
if (disableDoubleClick) {
|
|
149
|
+
handler.removeInputAction(this.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
|
|
150
|
+
}
|
|
151
|
+
if (disableLeftClick) {
|
|
152
|
+
handler.removeInputAction(this.Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
clearAll() {
|
|
157
|
+
while (this.actives.length) {
|
|
158
|
+
const h = this.actives.pop();
|
|
159
|
+
try {
|
|
160
|
+
h?.clear();
|
|
161
|
+
} catch {}
|
|
162
|
+
}
|
|
163
|
+
for (const [, handler] of this.recordHandlers) {
|
|
164
|
+
try {
|
|
165
|
+
handler.clear();
|
|
166
|
+
} catch {}
|
|
167
|
+
}
|
|
168
|
+
this.recordHandlers.clear();
|
|
169
|
+
this.measurements = [];
|
|
170
|
+
this._removeAllDeleteLabels();
|
|
171
|
+
this.specifiedClear = false;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
public getMeasurementsConfig(): MeasurementsConfig {
|
|
175
|
+
return {
|
|
176
|
+
measurements: this.measurements.map((m) => ({
|
|
177
|
+
...m,
|
|
178
|
+
options: m.options ? { ...(m.options as any) } : m.options,
|
|
179
|
+
positions: m.positions ? m.positions.map((p) => [p[0], p[1], p[2]]) : m.positions,
|
|
180
|
+
data: m.data ? { ...(m.data as any) } : m.data,
|
|
181
|
+
})),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
public setMeasurementsConfig(config: MeasurementsConfig) {
|
|
186
|
+
if (!config?.measurements?.length) return;
|
|
187
|
+
for (const rec of config.measurements) {
|
|
188
|
+
let handler: IMeasure | null = null;
|
|
189
|
+
switch (rec.type) {
|
|
190
|
+
case 'horizontal':
|
|
191
|
+
handler = new HorizontalMeasure(this.Cesium, this.viewer);
|
|
192
|
+
break;
|
|
193
|
+
case 'vertical':
|
|
194
|
+
handler = new VerticalMeasure(this.Cesium, this.viewer);
|
|
195
|
+
break;
|
|
196
|
+
case 'triangle':
|
|
197
|
+
handler = new TriangleMeasure(this.Cesium, this.viewer);
|
|
198
|
+
break;
|
|
199
|
+
case 'space':
|
|
200
|
+
handler = new SpaceMeasure(this.Cesium, this.viewer);
|
|
201
|
+
break;
|
|
202
|
+
case 'area':
|
|
203
|
+
handler = new AreaMeasure(this.Cesium, this.viewer);
|
|
204
|
+
break;
|
|
205
|
+
case 'circle':
|
|
206
|
+
handler = new CircleMeasure(this.Cesium, this.viewer);
|
|
207
|
+
break;
|
|
208
|
+
case 'polyline':
|
|
209
|
+
handler = new PolylineDistanceMeasure(this.Cesium, this.viewer);
|
|
210
|
+
break;
|
|
211
|
+
case 'terrainHeight':
|
|
212
|
+
handler = new TerrainHeightMeasure(this.Cesium, this.viewer);
|
|
213
|
+
break;
|
|
214
|
+
case 'coordinate':
|
|
215
|
+
handler = new CoordinateMeasure(this.Cesium, this.viewer);
|
|
216
|
+
break;
|
|
217
|
+
case 'rectangle':
|
|
218
|
+
handler = new RectangleMeasure(this.Cesium, this.viewer);
|
|
219
|
+
break;
|
|
220
|
+
case 'regularPolygon':
|
|
221
|
+
handler = new RegularPolygonMeasure(this.Cesium, this.viewer);
|
|
222
|
+
break;
|
|
223
|
+
default:
|
|
224
|
+
handler = null;
|
|
225
|
+
}
|
|
226
|
+
handler?.rehydrate?.(rec, undefined);
|
|
227
|
+
if (handler && rec.id) {
|
|
228
|
+
this.recordHandlers.set(rec.id, handler);
|
|
229
|
+
}
|
|
230
|
+
const exists = this.measurements.find((r) => r.id === rec.id);
|
|
231
|
+
if (!exists) this.measurements.push(rec);
|
|
232
|
+
}
|
|
233
|
+
if (this.specifiedClear) {
|
|
234
|
+
this._showDeleteLabels('html-label-container');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
private _serializeMetrics(type: MeasurementType, result: any) {
|
|
239
|
+
switch (type) {
|
|
240
|
+
case 'space':
|
|
241
|
+
return { distance: result?.distance };
|
|
242
|
+
case 'horizontal':
|
|
243
|
+
return { distance: result?.distance };
|
|
244
|
+
case 'vertical':
|
|
245
|
+
return { vertical: result?.vertical };
|
|
246
|
+
case 'polyline':
|
|
247
|
+
return { distance: result?.distance };
|
|
248
|
+
case 'area':
|
|
249
|
+
return { area: result?.area };
|
|
250
|
+
case 'circle':
|
|
251
|
+
return { radius: result?.radius, area: result?.area, perimeter: result?.perimeter };
|
|
252
|
+
case 'rectangle':
|
|
253
|
+
return { width: result?.width, height: result?.height, area: result?.area };
|
|
254
|
+
case 'regularPolygon':
|
|
255
|
+
return {
|
|
256
|
+
sides: result?.sides,
|
|
257
|
+
radius: result?.radius,
|
|
258
|
+
perimeter: result?.perimeter,
|
|
259
|
+
area: result?.area,
|
|
260
|
+
};
|
|
261
|
+
case 'triangle':
|
|
262
|
+
return { lengths: result?.lengths, angles: result?.angles };
|
|
263
|
+
case 'terrainHeight':
|
|
264
|
+
return {
|
|
265
|
+
terrainHeight: result?.terrainHeight,
|
|
266
|
+
difference: result?.difference,
|
|
267
|
+
position: result?.position,
|
|
268
|
+
zeroPosition: result?.zeroPosition,
|
|
269
|
+
};
|
|
270
|
+
case 'coordinate':
|
|
271
|
+
return { lnglat: result?.lnglat };
|
|
272
|
+
default:
|
|
273
|
+
return {};
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
private _toCartesian(arr: [number, number, number]) {
|
|
278
|
+
const Cesium = this.Cesium;
|
|
279
|
+
return new Cesium.Cartesian3(arr[0], arr[1], arr[2]);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
private _removeRecordVisual(_rec: MeasurementRecord) {
|
|
283
|
+
const viewer = this.viewer;
|
|
284
|
+
const Cesium = this.Cesium;
|
|
285
|
+
const entities = viewer.entities.values;
|
|
286
|
+
for (let i = entities.length - 1; i >= 0; i--) {
|
|
287
|
+
const e = entities[i];
|
|
288
|
+
try {
|
|
289
|
+
viewer.entities.remove(e);
|
|
290
|
+
} catch {}
|
|
291
|
+
}
|
|
292
|
+
const primitives = viewer.scene.primitives;
|
|
293
|
+
const arr: any[] = [];
|
|
294
|
+
primitives._primitives && primitives._primitives.forEach((p: any) => arr.push(p));
|
|
295
|
+
for (const p of arr) {
|
|
296
|
+
try {
|
|
297
|
+
viewer.scene.primitives.remove(p);
|
|
298
|
+
} catch {}
|
|
299
|
+
}
|
|
300
|
+
if (this.htmlLabelPool) {
|
|
301
|
+
this.htmlLabelPool.removeAll();
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
public toggleSpecifiedClear(containerId?: string) {
|
|
306
|
+
if (!this.specifiedClear) {
|
|
307
|
+
this.specifiedClear = true;
|
|
308
|
+
if (!this.deleteLabelPool) {
|
|
309
|
+
const cid = containerId || 'html-label-container';
|
|
310
|
+
this.deleteLabelPool = new HtmlOverlayLabelPool(this.Cesium, this.viewer, cid);
|
|
311
|
+
this.deleteLabelPool.registerTheme('measure-delete-label', {
|
|
312
|
+
createElement: (el: HTMLDivElement, ctx: any) => {
|
|
313
|
+
el.innerHTML = '删除';
|
|
314
|
+
el.style.background = 'rgba(255,0,0,0.7)';
|
|
315
|
+
el.style.color = '#fff';
|
|
316
|
+
el.style.font = '12px sans-serif';
|
|
317
|
+
el.style.padding = '2px 6px';
|
|
318
|
+
el.style.borderRadius = '4px';
|
|
319
|
+
el.style.whiteSpace = 'nowrap';
|
|
320
|
+
},
|
|
321
|
+
options: { offset: { x: 0, y: -10 } },
|
|
322
|
+
});
|
|
323
|
+
this.deleteLabelPool.eventBus.addListener(
|
|
324
|
+
MarkerEventKey.Click,
|
|
325
|
+
{
|
|
326
|
+
name: 'measurement_delete_label_click',
|
|
327
|
+
fn: (info: any) => {
|
|
328
|
+
if (!info || info.theme !== 'measure-delete-label') return;
|
|
329
|
+
const rid = info?.data?.recordId;
|
|
330
|
+
if (rid) this.deleteMeasurement(rid);
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
true,
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
this._showDeleteLabels(containerId || 'html-label-container');
|
|
337
|
+
} else {
|
|
338
|
+
this._removeAllDeleteLabels();
|
|
339
|
+
this.specifiedClear = false;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
public deleteMeasurement(recordId: string) {
|
|
344
|
+
const handler = this.recordHandlers.get(recordId);
|
|
345
|
+
if (handler) {
|
|
346
|
+
try {
|
|
347
|
+
handler.clear();
|
|
348
|
+
} catch {}
|
|
349
|
+
}
|
|
350
|
+
this.recordHandlers.delete(recordId);
|
|
351
|
+
this.measurements = this.measurements.filter((m) => m.id !== recordId);
|
|
352
|
+
const did = this.deleteLabelIds.get(recordId);
|
|
353
|
+
if (did && this.deleteLabelPool) {
|
|
354
|
+
this.deleteLabelPool.removeByIds([did]);
|
|
355
|
+
}
|
|
356
|
+
this.deleteLabelIds.delete(recordId);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
private _showDeleteLabels(containerId?: string) {
|
|
360
|
+
if (!this.deleteLabelPool) return;
|
|
361
|
+
const Cesium = this.Cesium;
|
|
362
|
+
for (const rec of this.measurements) {
|
|
363
|
+
const id = 'm_del_' + rec.id;
|
|
364
|
+
if (this.deleteLabelIds.has(rec.id)) continue;
|
|
365
|
+
const center = this._computeRecordCenter(rec);
|
|
366
|
+
if (!center) continue;
|
|
367
|
+
const carto = Cesium.Cartographic.fromCartesian(center);
|
|
368
|
+
const lon = Cesium.Math.toDegrees(carto.longitude);
|
|
369
|
+
const lat = Cesium.Math.toDegrees(carto.latitude);
|
|
370
|
+
const h = carto.height || 0;
|
|
371
|
+
this.deleteLabelPool.add(
|
|
372
|
+
{ recordId: rec.id },
|
|
373
|
+
{
|
|
374
|
+
id,
|
|
375
|
+
lon,
|
|
376
|
+
lat,
|
|
377
|
+
height: h,
|
|
378
|
+
theme: 'measure-delete-label',
|
|
379
|
+
show: true,
|
|
380
|
+
style: { zIndex: '1000' },
|
|
381
|
+
},
|
|
382
|
+
);
|
|
383
|
+
this.deleteLabelIds.set(rec.id, id);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
private _removeAllDeleteLabels() {
|
|
388
|
+
if (this.deleteLabelPool) {
|
|
389
|
+
const ids = Array.from(this.deleteLabelIds.values());
|
|
390
|
+
if (ids.length) this.deleteLabelPool.removeByIds(ids);
|
|
391
|
+
}
|
|
392
|
+
this.deleteLabelIds.clear();
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
private _computeRecordCenter(rec: MeasurementRecord) {
|
|
396
|
+
const Cesium = this.Cesium;
|
|
397
|
+
const posList = (rec.positions || []).map((p) => this._toCartesian(p));
|
|
398
|
+
if (posList.length > 0) {
|
|
399
|
+
const cx = posList.reduce((s, p) => s + p.x, 0) / posList.length;
|
|
400
|
+
const cy = posList.reduce((s, p) => s + p.y, 0) / posList.length;
|
|
401
|
+
const cz = posList.reduce((s, p) => s + p.z, 0) / posList.length;
|
|
402
|
+
return new Cesium.Cartesian3(cx, cy, cz);
|
|
403
|
+
}
|
|
404
|
+
if (rec.type === 'coordinate' && rec.data?.lnglat) {
|
|
405
|
+
const lng = rec.data.lnglat.lng;
|
|
406
|
+
const lat = rec.data.lnglat.lat;
|
|
407
|
+
const height = rec.data.lnglat.height || 0;
|
|
408
|
+
return Cesium.Cartesian3.fromDegrees(lng, lat, height);
|
|
409
|
+
}
|
|
410
|
+
if (rec.type === 'terrainHeight' && rec.data?.position) {
|
|
411
|
+
const p = rec.data.position;
|
|
412
|
+
return new Cesium.Cartesian3(p.x, p.y, p.z);
|
|
413
|
+
}
|
|
414
|
+
return null;
|
|
415
|
+
}
|
|
416
|
+
}
|