Compare commits

..

No commits in common. "568e89686f7fa0330d06df56854c4f71168f6560" and "00488a301f0522d3d51db5380c7bf30732ed5fc1" have entirely different histories.

2 changed files with 24 additions and 56 deletions

View File

@ -176,8 +176,7 @@ export function useMapMarkers() {
pixelSize: 12, pixelSize: 12,
outlineColor: Cesium.Color.WHITE, outlineColor: Cesium.Color.WHITE,
outlineWidth: 2, outlineWidth: 2,
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
disableDepthTestDistance: Number.POSITIVE_INFINITY
} }
}) })
entities.push(pointEntity) entities.push(pointEntity)
@ -655,8 +654,7 @@ export function useMapMarkers() {
width: 48, width: 48,
height: 48, height: 48,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM, verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
heightReference: resolveBillboardHeightReference(result.samplingSucceeded), heightReference: resolveBillboardHeightReference(result.samplingSucceeded)
disableDepthTestDistance: Number.POSITIVE_INFINITY
}, },
properties: { properties: {
type, type,
@ -743,8 +741,7 @@ export function useMapMarkers() {
width: 48, width: 48,
height: 48, height: 48,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM, verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
heightReference: resolveBillboardHeightReference(result.samplingSucceeded), heightReference: resolveBillboardHeightReference(result.samplingSucceeded)
disableDepthTestDistance: Number.POSITIVE_INFINITY
}, },
properties: { properties: {
type: 'station', type: 'station',

View File

@ -694,30 +694,28 @@ const initializeScene = async () => {
}, },
}) })
// 3. - 10.5 // 3.
// const allMockPoints = mockDataService.getAllMockPoints()
// const allMockPoints = mockDataService.getAllMockPoints() allMockPoints.forEach((point) => {
// allMockPoints.forEach((point) => { const config =
// const config = point.type === 'soldier'
// point.type === 'soldier' ? mockDataService.createPersonnelEntityConfig(point, soldierIcon)
// ? mockDataService.createPersonnelEntityConfig(point, soldierIcon) : mockDataService.createDeviceEntityConfig(point, deviceIcon)
// : mockDataService.createDeviceEntityConfig(point, deviceIcon) viewer.entities.add(config)
// viewer.entities.add(config) })
// }) console.log(`[index.vue] 已添加 ${allMockPoints.length} 个模拟点位`)
// console.log(`[index.vue] ${allMockPoints.length} `)
// 4. ""- 10.5 // 4. ""
// const allPaths = mockDataService.getAllAnimationPaths()
// const allPaths = mockDataService.getAllAnimationPaths() Object.entries(allPaths).forEach(([pathId, path]) => {
// Object.entries(allPaths).forEach(([pathId, path]) => { const icon = path.metadata.type === 'soldier' ? soldierIcon : deviceIcon
// const icon = path.metadata.type === 'soldier' ? soldierIcon : deviceIcon const config = mockDataService.createPathStartMarkerConfig(
// const config = mockDataService.createPathStartMarkerConfig( { ...path, id: pathId },
// { ...path, id: pathId }, icon
// icon )
// ) viewer.entities.add(config)
// viewer.entities.add(config) })
// }) console.log('[index.vue] 已添加 3 个路径起点标记')
// console.log('[index.vue] 3 ')
// 5. // 5.
mapClickHandler.setupClickHandler(viewer, registerEventHandler, registerPostRenderListener) mapClickHandler.setupClickHandler(viewer, registerEventHandler, registerPostRenderListener)
@ -783,33 +781,6 @@ const initializeScene = async () => {
console.log('[index.vue] 等待地形完全就绪...') console.log('[index.vue] 等待地形完全就绪...')
await new Promise(resolve => setTimeout(resolve, 1000)) await new Promise(resolve => setTimeout(resolve, 1000))
// 10.5.
console.log('[index.vue] 添加模拟点位...')
const allMockPoints = mockDataService.getAllMockPoints()
allMockPoints.forEach((point) => {
const config =
point.type === 'soldier'
? mockDataService.createPersonnelEntityConfig(point, soldierIcon)
: mockDataService.createDeviceEntityConfig(point, deviceIcon)
viewer.entities.add(config)
})
console.log(`[index.vue] 已添加 ${allMockPoints.length} 个模拟点位`)
// ""
const allPaths = mockDataService.getAllAnimationPaths()
Object.entries(allPaths).forEach(([pathId, path]) => {
const icon = path.metadata.type === 'soldier' ? soldierIcon : deviceIcon
const config = mockDataService.createPathStartMarkerConfig(
{ ...path, id: pathId },
icon
)
viewer.entities.add(config)
})
console.log('[index.vue] 已添加 3 个路径起点标记')
// CLAMP_TO_GROUND
viewer.scene.requestRender()
// 11. // 11.
console.log('[index.vue] 加载应急资源数据...') console.log('[index.vue] 加载应急资源数据...')
await loadEmergencyResources(DISASTER_CENTER.lon, DISASTER_CENTER.lat) await loadEmergencyResources(DISASTER_CENTER.lon, DISASTER_CENTER.lat)