huweili-cesium 1.2.0 → 1.2.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 +3 -3
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -172,10 +172,10 @@ npm run sync
|
|
|
172
172
|
| `public/config/constants.js` | `window.MapInstanceIds` 定义多地图 ID(如 `HOME: 'home-main-map'`) | `:map-id` 须与之一致,工具栏回调里的 `mapId` 也要传同一个值 |
|
|
173
173
|
| `public/config/mapConfig.js` | `window.MapConfig`(中心点、2D/3D、底图列表、是否显示 Cesium 自带控件等) | 控制地图初始化;`control.homeButton: false` 时由自定义工具栏替代 |
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
在页面中引用常量(从 `runtimeConfig` 导入):
|
|
176
176
|
|
|
177
177
|
```js
|
|
178
|
-
import { MapInstanceIds } from '@/
|
|
178
|
+
import { MapInstanceIds } from '@/config/runtimeConfig'
|
|
179
179
|
|
|
180
180
|
const HOME_MAP_ID = MapInstanceIds?.HOME || 'home-main-map'
|
|
181
181
|
```
|
|
@@ -195,7 +195,7 @@ const HOME_MAP_ID = MapInstanceIds?.HOME || 'home-main-map'
|
|
|
195
195
|
|
|
196
196
|
<script setup>
|
|
197
197
|
import CesiumMap from 'huweili-cesium'
|
|
198
|
-
import { MapInstanceIds } from '@/
|
|
198
|
+
import { MapInstanceIds } from '@/config/runtimeConfig'
|
|
199
199
|
import { getHomeToolbarButtons } from '@/utils/homeToolbarButtons'
|
|
200
200
|
|
|
201
201
|
const HOME_MAP_ID = MapInstanceIds?.HOME || 'home-main-map'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huweili-cesium",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "基于 Cesium 的地图工具库(无人机态势、轨迹、围栏、工具栏等)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -107,7 +107,8 @@
|
|
|
107
107
|
],
|
|
108
108
|
"scripts": {
|
|
109
109
|
"sync": "node scripts/sync-from-source.mjs",
|
|
110
|
-
"prepublishOnly": "node scripts/verify-files.mjs"
|
|
110
|
+
"prepublishOnly": "node scripts/verify-files.mjs",
|
|
111
|
+
"prepare": "node scripts/welcome.js"
|
|
111
112
|
},
|
|
112
113
|
"keywords": [
|
|
113
114
|
"cesium",
|