| | |
| | | const getViewer = () => viewer |
| | | const getPublicCesium = () => viewInstance |
| | | |
| | | defineExpose({ getMap, getViewer, getPublicCesium, setAdminBoundaryVisible, zoomToAdminBoundary }) |
| | | const flyToPoint = (options) => { |
| | | const { longitude, latitude, height } = options.position |
| | | |
| | | viewer.camera.setView({ |
| | | destination: Cesium.Cartesian3.fromDegrees(longitude, latitude, height), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(0), // 方向 |
| | | pitch: Cesium.Math.toRadians(-90), // 仰角 |
| | | roll: Cesium.Math.toRadians(0) // 翻滚角 |
| | | } |
| | | }) |
| | | } |
| | | |
| | | defineExpose({ getMap, getViewer, getPublicCesium, flyToPoint, setAdminBoundaryVisible, zoomToAdminBoundary }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |