Compare commits

..

No commits in common. "de46f7ea950b20bd61e5598f05379a9eb30b791d" and "17b9fdcc9fb9fc818086aa2eff1704134dc4c0c3" have entirely different histories.

1 changed files with 2 additions and 3 deletions

View File

@ -1289,7 +1289,7 @@ export default {
const collection = new Cesium.CustomDataSource('trajectoryEntityCollection') const collection = new Cesium.CustomDataSource('trajectoryEntityCollection')
collection.entities.add(entity) collection.entities.add(entity)
viewer.dataSources.add(collection) viewer.dataSources.add(collection)
this.trajectoryEntityCollection = Object.freeze(collection) this.trajectoryEntityCollection = collection
} }
}) })
}, },
@ -2450,8 +2450,8 @@ export default {
const wsUrl = config.NoDwSysUrl + '/ltLocation/DW_' + new Date().getTime() + '_98' const wsUrl = config.NoDwSysUrl + '/ltLocation/DW_' + new Date().getTime() + '_98'
_this.fwebsocket = new WebSocket(encodeURI(wsUrl)) _this.fwebsocket = new WebSocket(encodeURI(wsUrl))
_this.fwebsocket.onmessage = function(message) { _this.fwebsocket.onmessage = function(message) {
console.info('接收消息')
const peopleList = JSON.parse(message.data) const peopleList = JSON.parse(message.data)
viewer.entities.suspendEvents()
for (let i = 0; i < peopleList.length; i++) { for (let i = 0; i < peopleList.length; i++) {
const item = peopleList[i] const item = peopleList[i]
if ((!item)) continue if ((!item)) continue
@ -2484,7 +2484,6 @@ export default {
_this.mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id _this.mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id
} }
} }
viewer.entities.resumeEvents()
} }
} }
}, },