huweili-cesium 1.2.7 → 1.2.8
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/index.vue +7 -5
- package/package.json +1 -1
package/index.vue
CHANGED
|
@@ -155,7 +155,7 @@ async function initCesium() {
|
|
|
155
155
|
if (!cesiumContainer.value) return
|
|
156
156
|
|
|
157
157
|
mapStore.setMapLoadSta(MapLoadStatus.LOADING, props.mapId)
|
|
158
|
-
if (DroneConfig
|
|
158
|
+
if (DroneConfig) {
|
|
159
159
|
mapStore.setTrailTime(DroneConfig.trailTime, props.mapId)
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -192,13 +192,15 @@ async function initCesium() {
|
|
|
192
192
|
mountToolbarButtons(map)
|
|
193
193
|
mapStore.setMapLoadSta(MapLoadStatus.LOADED, props.mapId)
|
|
194
194
|
|
|
195
|
-
// 6.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
// 7. 通知宿主(相机、工具栏已就绪)
|
|
195
|
+
// 6. 通知宿主(必须在相机 finalize 之前,与历史行为一致)
|
|
196
|
+
// 宿主在 mapOnLoad 内同步添加半球、航迹、无人机等 Entity/Primitive;
|
|
197
|
+
// 若先 setInitialCameraView 再 onload,首帧已绘制且部分场景下实体不刷新。
|
|
199
198
|
emitMapReady(map, center)
|
|
200
199
|
console.log(`Cesium 地图加载成功,mapId: ${props.mapId}`)
|
|
201
200
|
|
|
201
|
+
// 7. 相机与首帧(须在容器尺寸稳定后 resize)
|
|
202
|
+
finalizeCameraAndRender(map, mapOptions, sceneMode)
|
|
203
|
+
|
|
202
204
|
// 8. 自管渲染循环(useDefaultRenderLoop: false)
|
|
203
205
|
startContinuousRendering(map)
|
|
204
206
|
} catch (error) {
|