huweili-cesium 1.0.3 → 1.0.4

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.
@@ -12,6 +12,7 @@ import { createBasemapSwitcher } from './toolbar/basemapSwitcher'
12
12
  import { createZoomController } from './toolbar/zoomController'
13
13
  import { createFullscreenController } from './toolbar/fullscreenController'
14
14
  import { useEventBus } from './utils/useEventBus.js'
15
+ import { useMapStore } from './stores/mapStore'
15
16
 
16
17
  /**
17
18
  * 创建自定义工具栏按钮
@@ -23,6 +24,7 @@ export function createCustomToolbarButtons() {
23
24
  const { toggleBasemapPickerPanel } = createBasemapSwitcher() // 地图切换器
24
25
  const { toggleMapFullscreen } = createFullscreenController() // 全屏控制器
25
26
  const { emit } = useEventBus() // 事件总线
27
+ const mapStore = useMapStore() // 地图状态管理器
26
28
 
27
29
  /**
28
30
  * 添加单个自定义工具栏按钮
@@ -126,6 +128,7 @@ export function createCustomToolbarButtons() {
126
128
  onClick: (v, btn) => {
127
129
  const result = toggleViewToRtk(mapId)
128
130
  if (result.success && btn) btn.innerText = result.currentMode
131
+ mapStore.setSceneMode(result.currentMode, mapId)
129
132
  }
130
133
  },
131
134
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huweili-cesium",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "基于 Cesium 的地图工具库(无人机态势、轨迹、围栏、工具栏等)",
5
5
  "type": "module",
6
6
  "main": "./index.js",