@xingm/vmap-cesium-toolbar 0.0.7-alpha.1 → 0.0.7-alpha.2
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/README.md +276 -0
- package/dist/hooks/toolBarConfig.d.ts +78 -0
- package/dist/hooks/useDrawHelper.d.ts +24 -0
- package/dist/hooks/useDynamicRing.d.ts +44 -0
- package/dist/hooks/useHeatmapHelper.d.ts +18 -0
- package/dist/hooks/useMap.d.ts +14 -0
- package/dist/hooks/useMapInit.d.ts +14 -0
- package/dist/hooks/useOverlayHelper.d.ts +48 -0
- package/dist/hooks/usePointClusterHelper.d.ts +14 -0
- package/dist/i18n/en-US.d.ts +148 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/zh-CN.d.ts +148 -0
- package/{index.d.ts → dist/index.d.ts} +1 -0
- package/{index.es.js → dist/index.es.js} +513 -473
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +342 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/libs/CesiumAutoRecover.d.ts +48 -0
- package/dist/libs/CesiumHeatmapLayer.d.ts +143 -0
- package/dist/libs/CesiumMapDraw.d.ts +251 -0
- package/dist/libs/CesiumMapLoader.d.ts +74 -0
- package/dist/libs/CesiumMapMark.d.ts +202 -0
- package/dist/libs/CesiumMapModel.d.ts +180 -0
- package/dist/libs/CesiumMapToolbar.d.ts +231 -0
- package/dist/libs/CesiumOverlayService.d.ts +227 -0
- package/dist/libs/CesiumPointClusterLayer.d.ts +93 -0
- package/dist/libs/PickGovernor.d.ts +23 -0
- package/dist/libs/config/CesiumMapConfig.d.ts +13 -0
- package/dist/libs/drawHelper/BaseDraw.d.ts +194 -0
- package/dist/libs/drawHelper/DrawCircle.d.ts +31 -0
- package/dist/libs/drawHelper/DrawHint.d.ts +32 -0
- package/dist/libs/drawHelper/DrawLine.d.ts +49 -0
- package/dist/libs/drawHelper/DrawPolgon.d.ts +35 -0
- package/dist/libs/drawHelper/DrawRectangle.d.ts +24 -0
- package/dist/libs/drawHelper/index.d.ts +6 -0
- package/dist/libs/i18n/en-US.d.ts +69 -0
- package/dist/libs/i18n/index.d.ts +25 -0
- package/dist/libs/i18n/zh-CN.d.ts +69 -0
- package/dist/libs/overlay/MapCircle.d.ts +130 -0
- package/dist/libs/overlay/MapIcon.d.ts +69 -0
- package/dist/libs/overlay/MapInfoWindow.d.ts +100 -0
- package/dist/libs/overlay/MapLabel.d.ts +73 -0
- package/dist/libs/overlay/MapMarker.d.ts +60 -0
- package/dist/libs/overlay/MapPolygon.d.ts +114 -0
- package/dist/libs/overlay/MapPolyline.d.ts +64 -0
- package/dist/libs/overlay/MapRectangle.d.ts +101 -0
- package/dist/libs/overlay/MapRing.d.ts +107 -0
- package/dist/libs/overlay/MapSVG.d.ts +73 -0
- package/dist/libs/overlay/OverlayEditController.d.ts +167 -0
- package/dist/libs/overlay/OverlayEditHandles.d.ts +101 -0
- package/dist/libs/overlay/OverlayHighlight.d.ts +40 -0
- package/dist/libs/overlay/index.d.ts +23 -0
- package/dist/libs/overlay/primitives/CirclePrimitiveBatch.d.ts +42 -0
- package/dist/libs/overlay/primitives/CirclePrimitiveLayerStack.d.ts +24 -0
- package/dist/libs/overlay/primitives/PolygonPrimitiveBatch.d.ts +43 -0
- package/dist/libs/overlay/primitives/PolygonPrimitiveLayerStack.d.ts +24 -0
- package/dist/libs/overlay/primitives/RectanglePrimitiveBatch.d.ts +41 -0
- package/dist/libs/overlay/primitives/RectanglePrimitiveLayerStack.d.ts +24 -0
- package/dist/libs/overlay/types.d.ts +121 -0
- package/dist/libs/toolBar/CesiumMapController.d.ts +87 -0
- package/dist/libs/toolBar/MapLayersService.d.ts +98 -0
- package/dist/libs/toolBar/MapSearchService.d.ts +51 -0
- package/dist/libs/toolBar/MapToolBarConfig.d.ts +10 -0
- package/dist/libs/toolBar/MeasurementService.d.ts +16 -0
- package/dist/libs/toolBar/NotFlyZonesService.d.ts +51 -0
- package/dist/package.json +46 -0
- package/dist/tdt/tdtAuth.d.ts +1 -0
- package/dist/tdt/tdtController.d.ts +16 -0
- package/dist/tdt/tdtPlugin.d.ts +14 -0
- package/dist/tdt/tdtProviders.d.ts +4 -0
- package/dist/tdt3dplug.es-pUYPBBmH.js +5264 -0
- package/dist/tdt3dplug.es-pUYPBBmH.js.map +1 -0
- package/dist/utils/calc.d.ts +50 -0
- package/dist/utils/common.d.ts +15 -0
- package/dist/utils/geojson.d.ts +86 -0
- package/dist/utils/overlayUtils.d.ts +149 -0
- package/dist/utils/selfIntersection.d.ts +15 -0
- package/dist/z.const.d.ts +24 -0
- package/package.json +74 -46
- package/index.umd.js +0 -337
- /package/{geojson → dist/geojson}/file-list.json +0 -0
- /package/{geojson → dist/geojson}//344/270/207/345/267/236_/344/272/224/346/241/245/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/211/344/272/232_/345/207/244/345/207/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/211/346/230/216_/346/262/231/345/216/277/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/212/346/265/267_/346/265/246/344/270/234/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/212/346/265/267_/350/231/271/346/241/245/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/212/351/245/266_/344/270/211/346/270/205/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/224/346/234/253_/347/216/211/351/203/275/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/234/350/220/245/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/255/345/215/253_/346/262/231/345/235/241/345/244/264/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/264/346/261/276_/344/271/224/346/235/216/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/264/346/262/202_/346/262/255/345/237/240/345/262/255/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/264/346/262/247_/345/215/232/345/260/232/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/271/344/270/234_/346/265/252/345/244/264/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/270/275/346/261/237_/344/270/211/344/271/211/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/271/211/344/271/214/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/271/214/345/205/260/345/257/237/345/270/203_/351/233/206/345/256/201/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/271/214/345/205/260/346/265/251/347/211/271_/344/276/235/345/213/222/345/212/233/347/211/271/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/271/214/346/265/267/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/271/214/351/262/201/346/234/250/351/275/220_/345/234/260/347/252/235/345/240/241/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/272/214/350/277/236/346/265/251/347/211/271_/350/265/233/344/271/214/347/264/240/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/272/225/345/206/210/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/274/212/345/256/201/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/274/212/346/230/245_/346/236/227/351/203/275/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/275/263/346/234/250/346/226/257/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//344/277/235/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/205/213/346/213/211/347/216/233/344/276/235/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/205/260/345/267/236_/344/270/255/345/267/235/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/205/264/344/271/211_/344/270/207/345/263/260/346/236/227/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/212/240/346/240/274/350/276/276/345/245/207_/345/230/216/344/273/231/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/214/205/345/244/264/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/214/227/344/272/254_/351/246/226/351/203/275/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/214/227/346/265/267_/347/246/217/346/210/220/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/215/201/345/240/260_/346/255/246/345/275/223/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/215/227/344/272/254_/347/246/204/345/217/243/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/215/227/345/256/201_/345/220/264/345/234/251/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/215/227/346/230/214_/346/230/214/345/214/227/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/215/227/351/200/232_/345/205/264/344/270/234/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/215/227/351/230/263_/345/247/234/350/220/245/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/215/232/344/271/220_/351/230/277/346/213/211/345/261/261/345/217/243/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/216/246/351/227/250_/351/253/230/345/264/216/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/217/260/345/267/236_/350/267/257/346/241/245/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/220/210/350/202/245_/346/226/260/346/241/245/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/220/220/351/262/201/347/225/252_/344/272/244/346/262/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/221/274/344/274/246/350/264/235/345/260/224_/346/265/267/346/213/211/345/260/224/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/221/274/345/222/214/346/265/251/347/211/271_/347/231/275/345/241/224/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/222/214/347/224/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/223/210/345/260/224/346/273/250_/345/244/252/345/271/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/224/220/345/261/261_/344/270/211/345/245/263/346/262/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/226/200/344/273/200/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/230/211/345/263/252/345/205/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/233/272/345/216/237_/345/205/255/347/233/230/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/241/224/345/237/216/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/244/247/345/220/214_/344/272/221/345/206/210/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/244/247/345/272/206_/350/220/250/345/260/224/345/233/276/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/244/247/350/277/236_/345/221/250/346/260/264/345/255/220/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/244/251/346/264/245_/346/273/250/346/265/267/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/244/252/345/216/237_/346/255/246/345/256/277/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/256/201/346/263/242_/346/240/216/347/244/276/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/256/201/350/222/227_/346/263/270/346/262/275/346/271/226/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/256/211/345/272/206/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/256/234/345/256/276_/350/217/234/345/235/235/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/256/234/346/230/214_/344/270/211/345/263/241/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/256/234/346/230/245_/346/230/216/346/234/210/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/257/214/350/225/264_/345/217/257/345/217/257/346/211/230/346/265/267/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/267/264/345/275/246/346/267/226/345/260/224_/345/244/251/345/220/211/346/263/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/270/203/345/260/224/346/264/245_/345/226/200/347/272/263/346/226/257/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/270/270/345/267/236_/345/245/224/347/211/233/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/270/270/345/276/267_/346/241/203/350/212/261/346/272/220/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/271/277/345/205/203_/347/233/230/351/276/231/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/271/277/345/267/236_/347/231/275/344/272/221/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/272/206/351/230/263_/350/245/277/345/263/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/272/223/350/275/246_/351/276/237/345/205/271/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/272/267/345/256/232/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/273/266/345/220/211_/346/234/235/351/230/263/345/267/235/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/274/240/345/256/266/347/225/214_/350/215/267/350/212/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/274/240/346/216/226_/347/224/230/345/267/236/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/276/220/345/267/236_/350/247/202/351/237/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/276/267/345/256/217_/350/212/222/345/270/202/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//345/277/273/345/267/236_/344/272/224/345/217/260/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/200/200/345/214/226_/350/212/267/346/261/237/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/201/251/346/226/275_/350/256/270/345/256/266/345/235/252/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/210/220/351/203/275_/345/217/214/346/265/201/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/211/216/345/205/260/345/261/257_/346/210/220/345/220/211/346/200/235/346/261/227/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/211/254/345/267/236_/346/263/260/345/267/236/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/212/232/350/277/234_/344/270/234/346/236/201/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/217/255/351/230/263_/346/275/256/346/261/225/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/224/200/346/236/235/350/212/261_/344/277/235/345/256/211/350/220/245/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/225/246/347/205/214/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/226/260/346/272/220_/351/202/243/346/213/211/346/217/220/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/227/245/347/205/247_/345/261/261/345/255/227/346/262/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/230/206/346/230/216_/351/225/277/346/260/264/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/231/256/346/264/261_/346/200/235/350/214/205/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/231/257/345/276/267/351/225/207_/347/275/227/345/256/266/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/234/235/351/230/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/235/255/345/267/236_/350/220/247/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/236/234/346/264/233_/347/216/233/346/262/201/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/237/263/345/267/236_/347/231/275/350/216/262/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/241/202/346/236/227_/344/270/244/346/261/237/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/242/205/345/216/277_/351/225/277/345/262/227/345/262/214/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/242/247/345/267/236/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/246/206/346/236/227_/346/246/206/351/230/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/255/246/346/261/211_/345/244/251/346/262/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/260/270/345/267/236_/351/233/266/351/231/265/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/261/211/344/270/255_/345/237/216/345/233/272/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/261/240/345/267/236_/344/271/235/345/215/216/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/262/210/351/230/263_/346/241/203/344/273/231/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/262/263/346/261/240_/351/207/221/345/237/216/346/261/237/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/263/211/345/267/236_/346/231/213/346/261/237/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/264/233/351/230/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/265/216/345/215/227_/351/201/245/345/242/231/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/265/216/345/256/201_/346/233/262/351/230/234/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/265/267/345/217/243_/347/276/216/345/205/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/265/267/350/245/277_/345/276/267/344/273/244/345/223/210/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/265/267/350/245/277_/350/212/261/345/234/237/346/262/237/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/267/256/345/256/211_/346/266/237/346/260/264/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/267/261/345/234/263_/345/256/235/345/256/211/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/270/251/345/267/236_/351/276/231/346/271/276/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/271/233/346/261/237/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/273/241/346/264/262/351/207/214_/350/245/277/351/203/212/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/274/240/346/262/263_/345/217/244/350/216/262/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/275/215/345/235/212/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//346/276/234/346/262/247_/346/231/257/350/277/210/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/203/237/345/217/260_/350/223/254/350/216/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/211/241/344/270/271/346/261/237_/346/265/267/346/265/252/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/216/211/346/240/221_/345/267/264/345/241/230/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/217/240/346/265/267_/351/207/221/346/271/276/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/220/274/346/265/267_/345/215/232/351/263/214/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/224/230/345/215/227_/345/244/217/346/262/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/231/275/345/237/216_/351/225/277/345/256/211/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/231/275/345/261/261_/351/225/277/347/231/275/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/231/276/350/211/262_/345/267/264/351/251/254/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/237/263/345/256/266/345/272/204_/346/255/243/345/256/232/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/237/263/346/262/263/345/255/220_/350/212/261/345/233/255/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/245/236/345/206/234/346/236/266_/347/272/242/345/235/252/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/246/217/345/267/236_/351/225/277/344/271/220/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/247/246/347/232/207/345/262/233_/345/214/227/346/210/264/346/262/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//347/250/273/345/237/216_/344/272/232/344/270/201/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/205/276/345/206/262_/351/251/274/345/263/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/220/245/345/217/243_/345/205/260/346/227/227/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/241/241/351/230/263_/345/215/227/345/262/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/241/242/345/267/236/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/245/204/351/230/263_/345/210/230/351/233/206/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/245/277/345/217/214/347/211/210/347/272/263_/345/230/216/346/264/222/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/245/277/345/256/201_/346/233/271/345/256/266/345/240/241/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/245/277/345/256/211_/345/222/270/351/230/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/245/277/346/230/214_/351/235/222/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/264/265/351/230/263_/351/276/231/346/264/236/345/240/241/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/265/243/345/267/236_/351/273/204/351/207/221/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/265/244/345/263/260_/347/216/211/351/276/231/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/276/276/345/267/236_/346/262/263/345/270/202/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//350/277/236/344/272/221/346/270/257_/347/231/275/345/241/224/345/237/240/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/200/232/345/214/226_/344/270/211/346/272/220/346/265/246/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/203/221/345/267/236_/346/226/260/351/203/221/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/204/202/345/260/224/345/244/232/346/226/257_/344/274/212/351/207/221/351/234/215/346/264/233/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/207/215/345/272/206_/346/261/237/345/214/227/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/207/221/346/230/214_/351/207/221/345/267/235/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/223/234/344/273/201_/345/207/244/345/207/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/223/266/345/267/235_/346/262/263/344/270/234/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/224/241/346/236/227/346/265/251/347/211/271/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/224/246/345/267/236_/351/224/246/345/267/236/346/271/276/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/225/277/346/230/245_/351/276/231/345/230/211/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/225/277/346/262/231_/351/273/204/350/212/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/230/277/345/205/213/350/213/217_/346/270/251/345/256/277/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/230/277/345/213/222/346/263/260/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/230/277/345/260/224/345/261/261_/344/274/212/345/260/224/346/226/275/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/235/222/345/262/233_/346/265/201/344/272/255/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/236/215/345/261/261_/350/205/276/351/263/214/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/270/241/350/245/277_/345/205/264/345/207/257/346/271/226/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/273/204/345/261/261_/345/261/257/346/272/252/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/273/216/345/271/263/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/273/221/346/262/263_/347/221/267/347/217/262/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/273/224/346/261/237_/346/255/246/351/231/265/345/261/261/346/234/272/345/234/272.geojson" +0 -0
- /package/{geojson → dist/geojson}//351/275/220/351/275/220/345/223/210/345/260/224_/344/270/211/345/256/266/345/255/220/346/234/272/345/234/272.geojson" +0 -0
- /package/{style.css → dist/style.css} +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Viewer, Entity } from '../../node_modules/cesium';
|
|
2
|
+
import { DrawEntity } from './drawHelper';
|
|
3
|
+
import { OverlayEntity, OverlayPosition } from './overlay/types';
|
|
4
|
+
import { MapMarker, MarkerOptions } from './overlay/MapMarker';
|
|
5
|
+
import { MapLabel, LabelOptions } from './overlay/MapLabel';
|
|
6
|
+
import { MapIcon, IconOptions } from './overlay/MapIcon';
|
|
7
|
+
import { MapSVG, SvgOptions } from './overlay/MapSVG';
|
|
8
|
+
import { MapInfoWindow, InfoWindowOptions } from './overlay/MapInfoWindow';
|
|
9
|
+
import { MapPolyline, PolylineOptions } from './overlay/MapPolyline';
|
|
10
|
+
import { MapPolygon, PolygonOptions } from './overlay/MapPolygon';
|
|
11
|
+
import { MapRectangle, RectangleOptions } from './overlay/MapRectangle';
|
|
12
|
+
import { MapCircle, CircleOptions } from './overlay/MapCircle';
|
|
13
|
+
import { MapRing, RingOptions } from './overlay/MapRing';
|
|
14
|
+
import { OverlayEditOptions } from './overlay/OverlayEditHandles';
|
|
15
|
+
export interface CesiumOverlayServiceOptions {
|
|
16
|
+
/**
|
|
17
|
+
* 是否启用实体 hover 处理器(MOUSE_MOVE 下会执行 pick/drillPick 并触发 hover 高亮)。
|
|
18
|
+
* 大屏/高负载场景可考虑关闭以规避 Cesium 在 primitive 重建窗口期的边界问题。
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
enableHoverHandler?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 覆盖物处于编辑模式时:一次拖拽结束(LEFT_UP)且几何发生变化会触发。
|
|
24
|
+
* 参数为“已回写后的覆盖物 entity”。
|
|
25
|
+
*/
|
|
26
|
+
onOverlayEditChange?: (entity: DrawEntity & OverlayEntity) => void;
|
|
27
|
+
/**
|
|
28
|
+
* 点击 pick 节流间隔(毫秒)。
|
|
29
|
+
* 用于降低 “贴地几何 + pick + ground pipeline” 的偶发 DataCloneError 风险。
|
|
30
|
+
* @default 120
|
|
31
|
+
*/
|
|
32
|
+
clickPickMinIntervalMs?: number;
|
|
33
|
+
/** 编辑功能配置项,默认为全开(除 rotate) */
|
|
34
|
+
overlayEditOptions?: OverlayEditOptions;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Cesium 覆盖物服务类
|
|
38
|
+
* 统一管理各种覆盖物工具类
|
|
39
|
+
*/
|
|
40
|
+
export declare class CesiumOverlayService {
|
|
41
|
+
private viewer;
|
|
42
|
+
private entities;
|
|
43
|
+
private overlayMap;
|
|
44
|
+
private infoWindowContainer;
|
|
45
|
+
/** 构造参数(用于开关 hover handler 等运行时策略) */
|
|
46
|
+
private readonly options;
|
|
47
|
+
private overlayEditor;
|
|
48
|
+
private overlayHighlight;
|
|
49
|
+
private lastHoverTargets;
|
|
50
|
+
private hoverPickRAF;
|
|
51
|
+
private hoverPickPos;
|
|
52
|
+
private overlayMutationRevision;
|
|
53
|
+
private hoverSuspendUntil;
|
|
54
|
+
private bulkUpdateDepth;
|
|
55
|
+
private readonly clickPickMinIntervalMs;
|
|
56
|
+
private readonly pickGovernor;
|
|
57
|
+
private static readonly HOVER_SUSPEND_AFTER_MUTATION_MS;
|
|
58
|
+
private static readonly CLICK_PICK_MIN_INTERVAL_MS;
|
|
59
|
+
private markOverlayMutated;
|
|
60
|
+
/**
|
|
61
|
+
* 显式开始一次批量更新:在 begin/end 期间暂停 hover pick。
|
|
62
|
+
* 建议 websocket 批量 add/remove 覆盖物时包裹使用,降低 Cesium GroundPrimitive 异步重建窗口期的 pick/update 压力。
|
|
63
|
+
*/
|
|
64
|
+
beginBulkUpdate(): void;
|
|
65
|
+
/**
|
|
66
|
+
* 结束一次批量更新。
|
|
67
|
+
*/
|
|
68
|
+
endBulkUpdate(): void;
|
|
69
|
+
/**
|
|
70
|
+
* 批量更新包裹器(自动 begin/end)。
|
|
71
|
+
*/
|
|
72
|
+
bulkUpdate<T>(fn: () => T): T;
|
|
73
|
+
/**
|
|
74
|
+
* Primitive 模式下,GeometryInstance.id 会是字符串(structured-cloneable),
|
|
75
|
+
* 需要映射回 overlayMap 内的根覆盖物 id。
|
|
76
|
+
*/
|
|
77
|
+
private normalizeOverlayPickId;
|
|
78
|
+
private resolveOverlayByPickId;
|
|
79
|
+
private resolvePickedOverlayEntity;
|
|
80
|
+
readonly marker: MapMarker;
|
|
81
|
+
readonly label: MapLabel;
|
|
82
|
+
readonly icon: MapIcon;
|
|
83
|
+
readonly svg: MapSVG;
|
|
84
|
+
readonly infoWindow: MapInfoWindow;
|
|
85
|
+
readonly polyline: MapPolyline;
|
|
86
|
+
readonly polygon: MapPolygon;
|
|
87
|
+
readonly rectangle: MapRectangle;
|
|
88
|
+
readonly circle: MapCircle;
|
|
89
|
+
readonly ring: MapRing;
|
|
90
|
+
constructor(viewer: Viewer, options?: CesiumOverlayServiceOptions);
|
|
91
|
+
/**
|
|
92
|
+
* 尝试从屏幕坐标拾取地表/模型位置并转为 Cartographic
|
|
93
|
+
*/
|
|
94
|
+
private pickCartographic;
|
|
95
|
+
/**
|
|
96
|
+
* 当 pick/drillPick 未命中时,使用经纬度判断是否落在 Rectangle 覆盖物内
|
|
97
|
+
*/
|
|
98
|
+
private findHoverableRectangleByCartographic;
|
|
99
|
+
/**
|
|
100
|
+
* 判断点是否在多边形内(2D)
|
|
101
|
+
*/
|
|
102
|
+
private isPointInPolygon2D;
|
|
103
|
+
private resolvePolygonPositions;
|
|
104
|
+
private findHoverablePolygonByCartographic;
|
|
105
|
+
private findHoverableCircleByCartographic;
|
|
106
|
+
/**
|
|
107
|
+
* 初始化信息窗口容器
|
|
108
|
+
*/
|
|
109
|
+
private initInfoWindowContainer;
|
|
110
|
+
/**
|
|
111
|
+
* 设置实体点击处理器
|
|
112
|
+
*/
|
|
113
|
+
private setupEntityClickHandler;
|
|
114
|
+
/**
|
|
115
|
+
* 开启或是关闭覆盖物的Hover高亮(鼠标移入高亮,移出取消)。
|
|
116
|
+
* - 开启后:覆盖物会触发高亮,且高亮状态会在鼠标移出时取消。
|
|
117
|
+
* - 关闭后:覆盖物不再触发 hover 高亮。
|
|
118
|
+
*/
|
|
119
|
+
toggleOverlayHoverHighlight(enabled: boolean): void;
|
|
120
|
+
/**
|
|
121
|
+
* 开启/关闭覆盖物编辑模式。
|
|
122
|
+
* - 开启后:点击覆盖物会进入编辑,并显示可拖拽控制点。
|
|
123
|
+
* - 关闭后:退出编辑并移除控制点。
|
|
124
|
+
* @param enabled 是否启用编辑模式
|
|
125
|
+
* @param overlayEditOptions 编辑功能配置项,可选。不传时使用构造函数传入的配置或默认配置
|
|
126
|
+
*/
|
|
127
|
+
setOverlayEditMode(enabled: boolean, overlayEditOptions?: OverlayEditOptions): void;
|
|
128
|
+
/** 当前是否处于覆盖物编辑模式(全局开关) */
|
|
129
|
+
getOverlayEditModeEnabled(): boolean;
|
|
130
|
+
/** 停止当前正在编辑的覆盖物(不会关闭全局编辑模式) */
|
|
131
|
+
stopOverlayEdit(): void;
|
|
132
|
+
/**
|
|
133
|
+
* 主动开始编辑某个覆盖物。
|
|
134
|
+
* @returns true 表示成功进入编辑
|
|
135
|
+
*/
|
|
136
|
+
startOverlayEdit(entityOrId: (DrawEntity & OverlayEntity) | string, options?: OverlayEditOptions): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* 设置实体 hover 高亮处理器(鼠标移入高亮,移出取消)
|
|
139
|
+
*/
|
|
140
|
+
private setupEntityHoverHandler;
|
|
141
|
+
private getPropertyValue;
|
|
142
|
+
private getNumberProperty;
|
|
143
|
+
/**
|
|
144
|
+
* 生成唯一ID
|
|
145
|
+
*/
|
|
146
|
+
private generateId;
|
|
147
|
+
toggleOverlayHighlight(entity: OverlayEntity, reason?: 'click' | 'hover'): void;
|
|
148
|
+
/**
|
|
149
|
+
* 高亮/取消高亮覆盖物(显式设置)
|
|
150
|
+
* @param entityOrId 覆盖物实体或 id
|
|
151
|
+
* @param enabled 是否高亮
|
|
152
|
+
* @param reason 高亮原因(默认 click)
|
|
153
|
+
*/
|
|
154
|
+
setOverlayHighlight(entityOrId: OverlayEntity | string, enabled: boolean, reason?: 'click' | 'hover'): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* 添加 Marker
|
|
157
|
+
*/
|
|
158
|
+
addMarker(options: MarkerOptions): Entity;
|
|
159
|
+
/**
|
|
160
|
+
* 添加 Label
|
|
161
|
+
*/
|
|
162
|
+
addLabel(options: LabelOptions): Entity;
|
|
163
|
+
/**
|
|
164
|
+
* 添加 Icon
|
|
165
|
+
*/
|
|
166
|
+
addIcon(options: IconOptions): Entity;
|
|
167
|
+
/**
|
|
168
|
+
* 添加 SVG
|
|
169
|
+
*/
|
|
170
|
+
addSvg(options: SvgOptions): Entity;
|
|
171
|
+
/**
|
|
172
|
+
* 添加 InfoWindow
|
|
173
|
+
*/
|
|
174
|
+
addInfoWindow(options: InfoWindowOptions): Entity;
|
|
175
|
+
/**
|
|
176
|
+
* 添加 Polyline
|
|
177
|
+
*/
|
|
178
|
+
addPolyline(options: PolylineOptions): Entity;
|
|
179
|
+
/**
|
|
180
|
+
* 添加 Polygon
|
|
181
|
+
*/
|
|
182
|
+
addPolygon(options: PolygonOptions): Entity;
|
|
183
|
+
/**
|
|
184
|
+
* 添加 Rectangle
|
|
185
|
+
*/
|
|
186
|
+
addRectangle(options: RectangleOptions): Entity;
|
|
187
|
+
/**
|
|
188
|
+
* 添加 Circle
|
|
189
|
+
*/
|
|
190
|
+
addCircle(options: CircleOptions): Entity;
|
|
191
|
+
/**
|
|
192
|
+
* 添加 Ring
|
|
193
|
+
*/
|
|
194
|
+
addRing(options: RingOptions): Entity;
|
|
195
|
+
/**
|
|
196
|
+
* 根据ID获取覆盖物
|
|
197
|
+
*/
|
|
198
|
+
getOverlay(id: string): Entity | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* 根据ID删除覆盖物
|
|
201
|
+
*/
|
|
202
|
+
removeOverlay(id: string): boolean;
|
|
203
|
+
/**
|
|
204
|
+
* 删除所有覆盖物
|
|
205
|
+
*/
|
|
206
|
+
removeAllOverlays(): void;
|
|
207
|
+
/**
|
|
208
|
+
* 更新覆盖物位置
|
|
209
|
+
*/
|
|
210
|
+
updateOverlayPosition(id: string, position: OverlayPosition): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* 显示/隐藏覆盖物
|
|
213
|
+
*/
|
|
214
|
+
setOverlayVisible(id: string, visible: boolean): boolean;
|
|
215
|
+
/**
|
|
216
|
+
* 获取所有覆盖物ID
|
|
217
|
+
*/
|
|
218
|
+
getAllOverlayIds(): string[];
|
|
219
|
+
/**
|
|
220
|
+
* 获取所有覆盖物
|
|
221
|
+
*/
|
|
222
|
+
getAllOverlays(): Entity[];
|
|
223
|
+
/**
|
|
224
|
+
* 销毁服务,清理所有资源
|
|
225
|
+
*/
|
|
226
|
+
destroy(): void;
|
|
227
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Viewer, Entity } from '../../node_modules/cesium';
|
|
2
|
+
import * as Cesium from 'cesium';
|
|
3
|
+
export interface ClusterPoint {
|
|
4
|
+
/** 业务 id(可选,建议传以便稳定更新) */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** 经度(度) */
|
|
7
|
+
lon: number;
|
|
8
|
+
/** 纬度(度) */
|
|
9
|
+
lat: number;
|
|
10
|
+
/** 高度(米,默认 0) */
|
|
11
|
+
height?: number;
|
|
12
|
+
/** 可选:权重/热度值(暂未参与聚类,仅透传给回调) */
|
|
13
|
+
value?: number;
|
|
14
|
+
/** 任意业务属性 */
|
|
15
|
+
properties?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface ClusterStyleStep {
|
|
18
|
+
/** 当 count >= minCount 时命中该样式(按 minCount 从大到小匹配更直观) */
|
|
19
|
+
minCount: number;
|
|
20
|
+
color: Cesium.Color | string;
|
|
21
|
+
/** 聚合点圆点大小(像素),不填则使用 options.clusterPixelSize */
|
|
22
|
+
pixelSize?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface PointClusterLayerOptions {
|
|
25
|
+
/** 图层 id(用于 Cesium.DataSourceCollection 里区分) */
|
|
26
|
+
id?: string;
|
|
27
|
+
/** 单点渲染:像素大小 */
|
|
28
|
+
pointPixelSize?: number;
|
|
29
|
+
/** 单点渲染:颜色 */
|
|
30
|
+
pointColor?: Cesium.Color | string;
|
|
31
|
+
/** 单点渲染:是否贴地(height=0 时等价贴地效果更明显) */
|
|
32
|
+
clampToGround?: boolean;
|
|
33
|
+
/** 聚类开关(默认 true) */
|
|
34
|
+
clusteringEnabled?: boolean;
|
|
35
|
+
/** 聚类像素范围(越大越容易聚合),默认 50 */
|
|
36
|
+
pixelRange?: number;
|
|
37
|
+
/** 最小聚类数量,默认 2 */
|
|
38
|
+
minimumClusterSize?: number;
|
|
39
|
+
/** 聚合点默认大小(像素) */
|
|
40
|
+
clusterPixelSize?: number;
|
|
41
|
+
/** 聚合点样式分段:用 count 决定颜色/大小 */
|
|
42
|
+
clusterStyleSteps?: ClusterStyleStep[];
|
|
43
|
+
/** 自定义聚合点渲染(直接修改 cluster entity) */
|
|
44
|
+
renderCluster?: (args: {
|
|
45
|
+
cluster: Entity;
|
|
46
|
+
clusteredEntities: Entity[];
|
|
47
|
+
count: number;
|
|
48
|
+
}) => void;
|
|
49
|
+
/** 自定义单点渲染(直接修改 point entity) */
|
|
50
|
+
renderSinglePoint?: (args: {
|
|
51
|
+
entity: Entity;
|
|
52
|
+
point: ClusterPoint;
|
|
53
|
+
}) => void;
|
|
54
|
+
/** 点击聚合点回调:返回该聚合内的原始点 */
|
|
55
|
+
onClusterClick?: (points: ClusterPoint[], ctx: {
|
|
56
|
+
screenPosition: Cesium.Cartesian2;
|
|
57
|
+
worldPosition?: Cesium.Cartesian3;
|
|
58
|
+
}) => void;
|
|
59
|
+
/** 点击单点回调 */
|
|
60
|
+
onPointClick?: (point: ClusterPoint, ctx: {
|
|
61
|
+
screenPosition: Cesium.Cartesian2;
|
|
62
|
+
worldPosition?: Cesium.Cartesian3;
|
|
63
|
+
}) => void;
|
|
64
|
+
/** entity id 前缀(用于避免与外部实体冲突) */
|
|
65
|
+
idPrefix?: string;
|
|
66
|
+
}
|
|
67
|
+
export default class CesiumPointClusterLayer {
|
|
68
|
+
private static readonly CLUSTER_STYLE_MIN_INTERVAL_MS;
|
|
69
|
+
private static readonly CLICK_PICK_MIN_INTERVAL_MS;
|
|
70
|
+
private viewer;
|
|
71
|
+
private readonly options;
|
|
72
|
+
private dataSource;
|
|
73
|
+
private entityIdToPoint;
|
|
74
|
+
private clickHandler;
|
|
75
|
+
private readonly layerId;
|
|
76
|
+
private pendingClusterStyles;
|
|
77
|
+
private clusterStyleRAF;
|
|
78
|
+
private clusterStyleTimer;
|
|
79
|
+
private lastClusterStyleFlushTime;
|
|
80
|
+
private readonly pickGovernor;
|
|
81
|
+
constructor(viewer: Viewer, options?: PointClusterLayerOptions);
|
|
82
|
+
/** 设置/替换点数据(经纬度单位:度) */
|
|
83
|
+
setData(points: ClusterPoint[]): void;
|
|
84
|
+
setVisible(visible: boolean): void;
|
|
85
|
+
setClusteringEnabled(enabled: boolean): void;
|
|
86
|
+
destroy(): void;
|
|
87
|
+
private enqueueClusterStyle;
|
|
88
|
+
private flushClusterStyles;
|
|
89
|
+
private applyClusterStyle;
|
|
90
|
+
private pickStyle;
|
|
91
|
+
private installClickHandler;
|
|
92
|
+
}
|
|
93
|
+
export { CesiumPointClusterLayer };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type PickGovernorKind = 'hover' | 'click' | 'cluster' | 'draw' | 'edit';
|
|
2
|
+
export interface PickGovernorProfile {
|
|
3
|
+
minIntervalMs: number;
|
|
4
|
+
minMovePx: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PickGovernorOptions {
|
|
7
|
+
profiles?: Partial<Record<PickGovernorKind, Partial<PickGovernorProfile>>>;
|
|
8
|
+
}
|
|
9
|
+
type PointLike = {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function isMacPlatform(): boolean;
|
|
14
|
+
export declare class PickGovernor {
|
|
15
|
+
private readonly profiles;
|
|
16
|
+
private readonly lastByKind;
|
|
17
|
+
private suspendUntil;
|
|
18
|
+
constructor(options?: PickGovernorOptions);
|
|
19
|
+
shouldPick(kind: PickGovernorKind, point: PointLike, nowMs?: number): boolean;
|
|
20
|
+
suspend(ms: number): void;
|
|
21
|
+
private isFinitePoint;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Viewer } from '../../../node_modules/cesium';
|
|
2
|
+
import { default as DrawHelper } from '../CesiumMapDraw';
|
|
3
|
+
import { MapType, ToolbarConfig, SearchCallback, MeasurementCallback, ZoomCallback } from '../CesiumMapModel';
|
|
4
|
+
export interface CesiumMapConfig {
|
|
5
|
+
viewer?: Viewer;
|
|
6
|
+
drawHelper?: DrawHelper;
|
|
7
|
+
toolbar?: ToolbarConfig;
|
|
8
|
+
search?: SearchCallback;
|
|
9
|
+
measurement?: MeasurementCallback;
|
|
10
|
+
zoom?: ZoomCallback;
|
|
11
|
+
mapTypes?: MapType[];
|
|
12
|
+
}
|
|
13
|
+
export declare const TDTMapTypes: MapType[];
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { Viewer, Entity, Cartesian3 } from '../../../node_modules/cesium';
|
|
2
|
+
import * as Cesium from "cesium";
|
|
3
|
+
/**
|
|
4
|
+
* 绘制结果接口
|
|
5
|
+
*/
|
|
6
|
+
export interface DrawResult {
|
|
7
|
+
entity: Entity | null;
|
|
8
|
+
type: "line" | "polygon" | "rectangle" | "circle";
|
|
9
|
+
positions: Cartesian3[];
|
|
10
|
+
distance?: number;
|
|
11
|
+
areaKm2?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 绘制回调接口
|
|
15
|
+
*/
|
|
16
|
+
export interface DrawCallbacks {
|
|
17
|
+
onDrawStart?: () => void;
|
|
18
|
+
onDrawEnd?: (entity: Entity | null, result: DrawResult) => void;
|
|
19
|
+
onEntityRemoved?: (entity: Entity) => void;
|
|
20
|
+
onMeasureComplete?: (result: DrawResult) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 扩展后的绘制实体类型
|
|
24
|
+
* 用于在 Entity 上挂载绘图相关的元数据
|
|
25
|
+
*/
|
|
26
|
+
export type DrawEntity = Entity & {
|
|
27
|
+
_drawType?: "line" | "polygon" | "rectangle" | "circle";
|
|
28
|
+
_drawOptions?: DrawOptions;
|
|
29
|
+
_groundPositions?: Cartesian3[];
|
|
30
|
+
_groundPosition?: Cartesian3;
|
|
31
|
+
_groundRectangle?: Cesium.Rectangle;
|
|
32
|
+
_radius?: number;
|
|
33
|
+
_borderEntity?: Entity;
|
|
34
|
+
/** 关联的测量/提示标签实体(例如面积标签) */
|
|
35
|
+
_labelEntities?: Entity[];
|
|
36
|
+
_onClick?: (entity: Entity, ...args: any[]) => void;
|
|
37
|
+
_isSelected?: boolean;
|
|
38
|
+
_originalStyle?: {
|
|
39
|
+
material?: any;
|
|
40
|
+
width?: any;
|
|
41
|
+
outlineColor?: any;
|
|
42
|
+
outlineWidth?: any;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* 绘制时可选的样式和事件回调
|
|
47
|
+
*/
|
|
48
|
+
export interface DrawOptions {
|
|
49
|
+
strokeColor?: Cesium.Color | string;
|
|
50
|
+
strokeWidth?: number;
|
|
51
|
+
fillColor?: Cesium.Color | string;
|
|
52
|
+
outlineColor?: Cesium.Color | string;
|
|
53
|
+
outlineWidth?: number;
|
|
54
|
+
selected?: {
|
|
55
|
+
color?: Cesium.Color | string;
|
|
56
|
+
width?: number;
|
|
57
|
+
outlineColor?: Cesium.Color | string;
|
|
58
|
+
outlineWidth?: number;
|
|
59
|
+
};
|
|
60
|
+
/** 是否显示面积标签(多边形/矩形)。默认 true */
|
|
61
|
+
showAreaLabel?: boolean;
|
|
62
|
+
/** 是否显示长度标签(线条)。默认 true */
|
|
63
|
+
showDistanceLabel?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 是否启用多边形自相交校验。
|
|
66
|
+
* - false/未设置:默认允许交叉(不做校验)
|
|
67
|
+
* - true:启用自相交校验(结合 selfIntersectionAllowTouch/AllowContinue 控制行为)
|
|
68
|
+
*/
|
|
69
|
+
selfIntersectionEnabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 多边形自相交校验:是否允许“擦边/顶点落在旧边上”等仅接触(touch)情况。
|
|
72
|
+
* - false/未设置:touch 也视为不合法
|
|
73
|
+
* - true:允许 touch,但仍不允许重叠(overlap)与真正穿越(cross)
|
|
74
|
+
*/
|
|
75
|
+
selfIntersectionAllowTouch?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 多边形自相交校验:当即将产生自相交时,是否仍允许继续绘制/完成绘制。
|
|
78
|
+
* - false/未设置:检测到自相交则阻止落点/阻止完成
|
|
79
|
+
* - true:检测到自相交不拦截(由业务自行承担后续面积/中心等偏差风险)
|
|
80
|
+
*/
|
|
81
|
+
selfIntersectionAllowContinue?: boolean;
|
|
82
|
+
onClick?: (entity: Entity, type?: "line" | "polygon" | "rectangle" | "circle", positions?: Cartesian3[]) => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 基础绘制类
|
|
86
|
+
* 包含所有绘制类型的通用逻辑
|
|
87
|
+
*/
|
|
88
|
+
export declare abstract class BaseDraw {
|
|
89
|
+
protected viewer: Viewer;
|
|
90
|
+
protected scene: Cesium.Scene;
|
|
91
|
+
protected entities: Cesium.EntityCollection;
|
|
92
|
+
protected offsetHeight: number;
|
|
93
|
+
protected originalDepthTestAgainstTerrain: boolean | null;
|
|
94
|
+
/**
|
|
95
|
+
* 当场景启用了 requestRenderMode(手动渲染)时,绘制过程中需要关闭该模式以保证动画和交互正常。
|
|
96
|
+
* 在绘制结束或取消时应恢复为原始值。
|
|
97
|
+
*/
|
|
98
|
+
protected originalRequestRenderMode: boolean | null;
|
|
99
|
+
protected callbacks: DrawCallbacks;
|
|
100
|
+
protected tempPositions: Cesium.Cartesian3[];
|
|
101
|
+
protected tempEntities: Cesium.Entity[];
|
|
102
|
+
protected tempLabelEntities: Cesium.Entity[];
|
|
103
|
+
protected finishedPointEntities: Cesium.Entity[];
|
|
104
|
+
/** 当前绘制的选项(如果有) */
|
|
105
|
+
protected drawOptions?: DrawOptions;
|
|
106
|
+
/**
|
|
107
|
+
* 公开只读访问当前临时数据,供调度器使用
|
|
108
|
+
*/
|
|
109
|
+
getTempPositions(): Cartesian3[];
|
|
110
|
+
getTempEntities(): Entity[];
|
|
111
|
+
getTempLabelEntities(): Entity[];
|
|
112
|
+
getFinishedPointEntities(): Entity[];
|
|
113
|
+
/**
|
|
114
|
+
* 允许调度器安全地重建临时数据
|
|
115
|
+
*/
|
|
116
|
+
setTempPositions(positions: Cartesian3[]): void;
|
|
117
|
+
setTempEntities(entities: Entity[]): void;
|
|
118
|
+
setTempLabelEntities(entities: Entity[]): void;
|
|
119
|
+
/**
|
|
120
|
+
* 供调度器调用的公开包装方法
|
|
121
|
+
*/
|
|
122
|
+
addPointForHelper(position: Cartesian3): void;
|
|
123
|
+
clearTempEntitiesForHelper(): void;
|
|
124
|
+
/**
|
|
125
|
+
* 清除当前绘制过程中的临时点实体
|
|
126
|
+
* 仅删除带有 point 组件的临时实体,保留其它临时线/面实体
|
|
127
|
+
*/
|
|
128
|
+
clearTempPointEntitiesForHelper(): void;
|
|
129
|
+
/**
|
|
130
|
+
* 删除最后一个点并根据剩余点重建预览实体
|
|
131
|
+
* 供调度器在右键删除点时调用,具体重建逻辑仍由各子类的 updateDrawingEntity 实现
|
|
132
|
+
*/
|
|
133
|
+
removeLastPointAndRedraw(): void;
|
|
134
|
+
/**
|
|
135
|
+
* 将任意颜色输入解析为 Cesium.Color
|
|
136
|
+
*/
|
|
137
|
+
protected resolveColor(input?: Cesium.Color | string): Cesium.Color;
|
|
138
|
+
/**
|
|
139
|
+
* 应用/切换选中样式(统一逻辑,供调度器和子类共用)
|
|
140
|
+
*/
|
|
141
|
+
protected applySelectedStyleToEntity(entity: Entity): void;
|
|
142
|
+
/**
|
|
143
|
+
* 恢复原始样式(兼容旧接口,内部仍走统一逻辑)
|
|
144
|
+
*/
|
|
145
|
+
protected restoreOriginalStyleForEntity(entity: Entity): void;
|
|
146
|
+
abstract updateDrawingEntity(previewPoint?: Cesium.Cartesian3): void;
|
|
147
|
+
abstract startDrawing(options?: DrawOptions): void;
|
|
148
|
+
/**
|
|
149
|
+
* 抽象方法:完成绘制
|
|
150
|
+
*/
|
|
151
|
+
abstract finishDrawing(): DrawResult | null;
|
|
152
|
+
/**
|
|
153
|
+
* 抽象方法:获取绘制类型
|
|
154
|
+
*/
|
|
155
|
+
abstract getDrawType(): "line" | "polygon" | "rectangle" | "circle";
|
|
156
|
+
constructor(viewer: Viewer, callbacks?: DrawCallbacks);
|
|
157
|
+
/**
|
|
158
|
+
* 根据场景模式更新偏移高度
|
|
159
|
+
*/
|
|
160
|
+
protected updateOffsetHeight(): void;
|
|
161
|
+
/**
|
|
162
|
+
* 拾取地形或椭球体上的位置
|
|
163
|
+
*/
|
|
164
|
+
protected pickGlobePosition(windowPosition: Cesium.Cartesian2): Cesium.Cartesian3 | null;
|
|
165
|
+
/**
|
|
166
|
+
* 如果场景启用了 requestRenderMode(手动渲染),在开始绘制时临时关闭以保证动画/交互正常。
|
|
167
|
+
*/
|
|
168
|
+
protected enableContinuousRenderingIfNeeded(): void;
|
|
169
|
+
/**
|
|
170
|
+
* 在绘制完成或取消时恢复 requestRenderMode 到原始状态(如果曾被修改过)。
|
|
171
|
+
*/
|
|
172
|
+
protected restoreRequestRenderModeIfNeeded(): void;
|
|
173
|
+
/**
|
|
174
|
+
* 添加一个点到临时位置数组并创建点实体
|
|
175
|
+
*/
|
|
176
|
+
protected addPoint(position: Cesium.Cartesian3): void;
|
|
177
|
+
/**
|
|
178
|
+
* 创建总长/面积标签图片
|
|
179
|
+
*/
|
|
180
|
+
protected createTotalLengthBillboardImage(text: string): HTMLCanvasElement;
|
|
181
|
+
/**
|
|
182
|
+
* 创建分段长度标签图片
|
|
183
|
+
*/
|
|
184
|
+
protected createSegmentLengthBillboardImage(text: string): HTMLCanvasElement;
|
|
185
|
+
/**
|
|
186
|
+
* 清理临时实体
|
|
187
|
+
*/
|
|
188
|
+
protected clearTempEntities(): void;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* 静态工具方法:切换实体的选中样式
|
|
192
|
+
* 用于避免在多个模块中重复实现相同逻辑
|
|
193
|
+
*/
|
|
194
|
+
export declare function toggleSelectedStyle(entity: DrawEntity): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Cartesian3 } from '../../../node_modules/cesium';
|
|
2
|
+
import { BaseDraw, DrawResult, DrawOptions } from './BaseDraw';
|
|
3
|
+
/**
|
|
4
|
+
* 画圆绘制类
|
|
5
|
+
*/
|
|
6
|
+
export declare class DrawCircle extends BaseDraw {
|
|
7
|
+
private currentCircleEntity;
|
|
8
|
+
private currentBorderEntity;
|
|
9
|
+
private centerPosition;
|
|
10
|
+
/**
|
|
11
|
+
* 开始绘制
|
|
12
|
+
*/
|
|
13
|
+
startDrawing(options?: DrawOptions): void;
|
|
14
|
+
addPoint(position: Cartesian3): void;
|
|
15
|
+
/**
|
|
16
|
+
* 更新绘制实体(预览)
|
|
17
|
+
*/
|
|
18
|
+
updateDrawingEntity(previewPoint?: Cartesian3): void;
|
|
19
|
+
/**
|
|
20
|
+
* 完成绘制
|
|
21
|
+
*/
|
|
22
|
+
finishDrawing(): DrawResult | null;
|
|
23
|
+
/**
|
|
24
|
+
* 获取绘制类型
|
|
25
|
+
*/
|
|
26
|
+
getDrawType(): "line" | "polygon" | "rectangle" | "circle";
|
|
27
|
+
/**
|
|
28
|
+
* 生成近似圆(多边形)顶点
|
|
29
|
+
*/
|
|
30
|
+
private generateCirclePositions;
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as Cesium from "cesium";
|
|
2
|
+
type DrawMode = "line" | "polygon" | "rectangle" | "circle" | null;
|
|
3
|
+
type DrawHintState = {
|
|
4
|
+
isDrawing: boolean;
|
|
5
|
+
drawMode: DrawMode;
|
|
6
|
+
tempPositions: Cesium.Cartesian3[];
|
|
7
|
+
offsetHeight: number;
|
|
8
|
+
};
|
|
9
|
+
export declare class DrawHintHelper {
|
|
10
|
+
private entities;
|
|
11
|
+
private getState;
|
|
12
|
+
private translate;
|
|
13
|
+
private drawHintEntity;
|
|
14
|
+
private drawHintText;
|
|
15
|
+
private drawHintLastPosition;
|
|
16
|
+
private drawHintOverrideText;
|
|
17
|
+
private drawHintOverrideUntil;
|
|
18
|
+
constructor(entities: Cesium.EntityCollection, getState: () => DrawHintState, translate: (key: string, params?: Record<string, any>) => string);
|
|
19
|
+
handleSceneModeChanged(): void;
|
|
20
|
+
setOverride(options: Cesium.LabelGraphics | Cesium.LabelGraphics.ConstructorOptions, ms?: number): void;
|
|
21
|
+
updatePosition(position: Cesium.Cartesian3): void;
|
|
22
|
+
refreshTextOnly(): void;
|
|
23
|
+
clear(): void;
|
|
24
|
+
/**
|
|
25
|
+
* 获取绘图提示文本的公共方法
|
|
26
|
+
* 根据当前的绘图状态和模式返回相应的提示信息
|
|
27
|
+
* @returns {string} 返回对应的提示文本,如果不在绘图状态则返回空字符串
|
|
28
|
+
*/
|
|
29
|
+
getDrawHintText(): string;
|
|
30
|
+
private toHintDisplayPosition;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Cartesian3 } from '../../../node_modules/cesium';
|
|
2
|
+
import { BaseDraw, DrawResult, DrawOptions } from './BaseDraw';
|
|
3
|
+
/**
|
|
4
|
+
* 画线绘制类
|
|
5
|
+
*/
|
|
6
|
+
export declare class DrawLine extends BaseDraw {
|
|
7
|
+
private currentLineEntity;
|
|
8
|
+
private currentSegmentLabels;
|
|
9
|
+
private currentTotalLabel;
|
|
10
|
+
private currentLinePositions;
|
|
11
|
+
private isTotalLabelWarmedUp;
|
|
12
|
+
private readonly avoidGroundPipeline;
|
|
13
|
+
/**
|
|
14
|
+
* 清理当前线段/总距离标签(不影响线实体本身)
|
|
15
|
+
*/
|
|
16
|
+
private clearDistanceLabels;
|
|
17
|
+
/**
|
|
18
|
+
* 开始绘制
|
|
19
|
+
*/
|
|
20
|
+
startDrawing(options?: DrawOptions): void;
|
|
21
|
+
/**
|
|
22
|
+
* 更新绘制实体(预览)
|
|
23
|
+
*/
|
|
24
|
+
updateDrawingEntity(previewPoint?: Cartesian3): void;
|
|
25
|
+
/**
|
|
26
|
+
* 完成绘制
|
|
27
|
+
*/
|
|
28
|
+
finishDrawing(): DrawResult | null;
|
|
29
|
+
/**
|
|
30
|
+
* 获取绘制类型
|
|
31
|
+
*/
|
|
32
|
+
getDrawType(): "line" | "polygon" | "rectangle" | "circle";
|
|
33
|
+
/**
|
|
34
|
+
* 清理线条实体
|
|
35
|
+
*/
|
|
36
|
+
private clearLineEntity;
|
|
37
|
+
/**
|
|
38
|
+
* 更新分段标签
|
|
39
|
+
*/
|
|
40
|
+
private updateSegmentLabels;
|
|
41
|
+
/**
|
|
42
|
+
* 更新总距离标签
|
|
43
|
+
*/
|
|
44
|
+
private updateTotalLabel;
|
|
45
|
+
/**
|
|
46
|
+
* 总长标签预热
|
|
47
|
+
*/
|
|
48
|
+
private warmupTotalLengthLabel;
|
|
49
|
+
}
|