|
@ -64,7 +64,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
fetchSceneConfig() { |
|
|
fetchSceneConfig() { |
|
|
getSceneConfig(this.sceneId).then((res) => { |
|
|
getSceneConfig(this.sceneId).then((res) => { |
|
|
console.log(res); |
|
|
|
|
|
if (res.success && res.data) { |
|
|
if (res.success && res.data) { |
|
|
const { |
|
|
const { |
|
|
initTime, |
|
|
initTime, |
|
@ -89,6 +88,30 @@ export default { |
|
|
this.viewForm.image = viewImg; |
|
|
this.viewForm.image = viewImg; |
|
|
const layerIds = JSON.parse(layerId); |
|
|
const layerIds = JSON.parse(layerId); |
|
|
this.$emit('set-checked-keys', layerIds); |
|
|
this.$emit('set-checked-keys', layerIds); |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
if (this.viewForm.image) { |
|
|
|
|
|
console.log(this.viewForm, viewer); |
|
|
|
|
|
const { lng, lat, alt, heading, pitch, roll } = this.viewForm; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
// viewer.scene.camera.setView({ |
|
|
|
|
|
// destination: new sycim.Cartesian3(lng, lat, alt), |
|
|
|
|
|
// orientation: { |
|
|
|
|
|
// heading, |
|
|
|
|
|
// pitch, |
|
|
|
|
|
// roll |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
window.viewer.scene.camera.setView({ |
|
|
|
|
|
destination: new Cesium.Cartesian3.fromDegrees(lng, lat, alt), |
|
|
|
|
|
orientation: { |
|
|
|
|
|
heading, |
|
|
|
|
|
pitch, |
|
|
|
|
|
roll |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, 1000); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
@ -131,14 +154,6 @@ export default { |
|
|
url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer' |
|
|
url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer' |
|
|
}); |
|
|
}); |
|
|
viewer.addBaseLayer(baseLayer); |
|
|
viewer.addBaseLayer(baseLayer); |
|
|
|
|
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
|
// let Tlayer = new sycim.TilesetLayer('Tlayer').addTo(viewer); |
|
|
|
|
|
// const tileset = new sycim.Tileset('/mapserver/jky-3dtiles/zjcm_encrypt/tileset.json'); |
|
|
|
|
|
// console.log(tileset); |
|
|
|
|
|
// Tlayer.addGraphic(tileset); |
|
|
|
|
|
// viewer.flyTo(tileset); |
|
|
|
|
|
// }); |
|
|
|
|
|
}, |
|
|
}, |
|
|
fetchView() { |
|
|
fetchView() { |
|
|
const { imageSrc, position, heading, pitch, roll } = getCanvasImageAndViewPoint(viewer); |
|
|
const { imageSrc, position, heading, pitch, roll } = getCanvasImageAndViewPoint(viewer); |
|
|