| | |
| | | }, |
| | | // 二维底图选择 |
| | | handleEMapClick(result, index) { |
| | | let p = sgworld.Navigate.getCameraInfo(); |
| | | let pitch; |
| | | if (pitch !== -90) { |
| | | pitch = -90; |
| | | sgworld.Navigate.flyToPointsInterest({ |
| | | destination: new Cesium.Cartesian3.fromDegrees( |
| | | p.location.lon, |
| | | p.location.lat, |
| | | p.location.height |
| | | ), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(0), |
| | | pitch: Cesium.Math.toRadians(pitch), |
| | | roll: Cesium.Math.toRadians(0), |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // 设置相机 |
| | | if (result.name == "二维地图") { |
| | | window.Viewer.scene.globe.maximumScreenSpaceError = 4/3; |
| | | window.Viewer.scene.globe.maximumScreenSpaceError = 4 / 3; |
| | | this.changeLayerView(25000, false); |
| | | } else if (result.name == "影像地图") { |
| | | window.Viewer.scene.globe.maximumScreenSpaceError = 4/3; |
| | | window.Viewer.scene.globe.maximumScreenSpaceError = 4 / 3; |
| | | this.changeLayerView(50000, false); |
| | | } |
| | | // 切换图层 |
| | |
| | | sgworld.Creator.DeleteObject(window.tdglLayer); |
| | | } |
| | | } else { |
| | | // 隐藏底部图层面版 |
| | | // 隐藏底部图层面版tdglLayer |
| | | store.setLayerPanelShow(false); |
| | | // 隐藏右上角菜单面板 |
| | | store.setMenuListShow(false); |
| | |
| | | layers[8].children[0].tileType === "Geo" |
| | | ? new Cesium.GeographicTilingScheme() |
| | | : new Cesium.WebMercatorTilingScheme(), |
| | | // alpha: layers[8].children[0].alpha, |
| | | alpha: this.alpha, |
| | | alpha: layers[8].children[0].alpha, |
| | | }, |
| | | "0", |
| | | layers[8].children[0].zIndex, |
| | | true, |
| | | "" |
| | | ); |
| | | //显示滑动条 |
| | | store.setTdglFlag(true); |
| | | break; |
| | | case 1: |