|
@@ -612,18 +612,19 @@ export default {
|
|
|
let layers = this.viewer.scene.layers.layerQueue.filter((i) => i.sceneType == 'BIM模型'),
|
|
|
temp = []
|
|
|
layers.forEach((item) => {
|
|
|
+ const { lat, lon } = item
|
|
|
let target = temp.find((i) => i.label == item.aliasName)
|
|
|
if (!target) {
|
|
|
- temp.push({ label: item.aliasName, children: [], info: { ...item } })
|
|
|
+ temp.push({ label: item.aliasName, children: [], info: { lat, lon } })
|
|
|
}
|
|
|
})
|
|
|
- this.BIMLayers = temp
|
|
|
+ this.BIMLayers = JSON.parse(JSON.stringify(temp))
|
|
|
},
|
|
|
LocateToBIM(data) {
|
|
|
const { info } = data || {}
|
|
|
const { lat, lon } = info
|
|
|
this.viewer.camera.flyTo({
|
|
|
- destination: Cesium.Cartesian3.fromDegrees(lon, lat, 500),
|
|
|
+ destination: Cesium.Cartesian3.fromDegrees(lon, lat, 2500),
|
|
|
orientation: {
|
|
|
heading: 0,
|
|
|
pitch: Cesium.Math.toRadians(-90),
|