ÎļþÃû´Ó src/assets/js/configTool.js ÐÞ¸Ä |
| | |
| | | time: 5, |
| | | setMapFly(res) { |
| | | var that = this; |
| | | |
| | | const alt = res.alt == 0 ? 100 : res.alt; |
| | | //设置åå§è§å¾ä½ç½® |
| | | Viewer.camera.flyTo({ |
| | | // fromDegrees()æ¹æ³ï¼å°ç»çº¬åº¦åé«ç¨è½¬æ¢ä¸ºä¸çåæ |
| | | destination: Cesium.Cartesian3.fromDegrees(res.lon, res.lat, res.alt), |
| | | destination: Cesium.Cartesian3.fromDegrees(res.lon, res.lat, alt), |
| | | orientation: { |
| | | // æ¹å |
| | | heading: res.heading, |
| | |
| | | getNewDateTime() { |
| | | return new Date().getTime(); |
| | | }, |
| | | getEndDateTime() { |
| | | return this.getNewDateTime() + 3600 * 2; |
| | | }, |
| | | //ç¹å»è·åç»çº¬åº¦ |
| | | getViewerPosition(res) { |
| | | const cartesain = Viewer.camera.pickEllipsoid(res.position); |
| | | var cartographic = Cesium.Cartographic.fromCartesian(cartesain); |
| | | return { |
| | | lon: parseFloat(Cesium.Math.toDegrees(cartographic.longitude)).toFixed(6), |
| | | lat: parseFloat(Cesium.Math.toDegrees(cartographic.latitude)).toFixed(6), |
| | | alt: cartographic.height, |
| | | heading: Viewer.scene.camera.heading, |
| | | pitch: Viewer.scene.camera.pitch, |
| | | roll: Viewer.scene.camera.roll, |
| | | }; |
| | | }, |
| | | //è·åå½åè§è§ä¿¡æ¯ |
| | | getViewerCamera() { |
| | | var position = Viewer.scene.camera.positionCartographic; |
| | | return { |