| | |
| | | curFuncIndex: -1, |
| | | curZTIndex: -1, |
| | | state: store.thematicLayer, |
| | | basicMapChecked: store.basicMapChecked.val, |
| | | basicMapChecked: store.basicMapChecked, |
| | | state1: store.tdglInfo, |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | // 二维底图选择 |
| | | 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; |
| | | this.changeLayerView(25000, false); |
| | | } else if (result.name == "影像地图") { |
| | | window.Viewer.scene.globe.maximumScreenSpaceError = 4 / 3; |
| | | this.changeLayerView(50000, false); |
| | | } |
| | | // 切换图层 |
| | |
| | | handleSMapClick(result, index) { |
| | | // 设置相机 |
| | | if (result.name == "3D城市") { |
| | | window.Viewer.scene.globe.maximumScreenSpaceError = 2; |
| | | this.changeLayerView(45000, true); |
| | | } else if (result.name == "三维模型") { |
| | | window.Viewer.scene.globe.maximumScreenSpaceError = 2; |
| | | this.changeLayerView(80000, true); |
| | | } |
| | | // 切换图层 |
| | |
| | | handleFuncClick(index) { |
| | | if (this.curFuncIndex == index) { |
| | | store.setTdglFlag(false); |
| | | store.setSliderShow(false); |
| | | store.setPoplayerListAction({}); |
| | | divPoint3 && divPoint3.deleteObject(); |
| | | store.setPoplayerShowAction(false); |
| | |
| | | this.curFuncIndex = -1; |
| | | window.clusterLayer && window.clusterLayer.clear(); |
| | | if (window.tdglLayer) { |
| | | store.setSliderShow(false); |
| | | sgworld.Creator.DeleteObject(window.tdglLayer); |
| | | } |
| | | } else { |
| | | // 隐藏底部图层面版 |
| | | // 隐藏底部图层面版tdglLayer |
| | | store.setLayerPanelShow(false); |
| | | // 隐藏右上角菜单面板 |
| | | store.setMenuListShow(false); |
| | | // 隐藏底部漫游面板 |
| | | store.setRoamPanelShow(false); |
| | | //显示滑动条 |
| | | store.setSliderShow(true); |
| | | this.curFuncIndex = index; |
| | | switch (index) { |
| | | case 0: |
| | | store.setSliderShow(true); |
| | | window.tdglLayer = sgworld.Creator.createImageryProvider( |
| | | layers[8].name, |
| | | "tms", |
| | |
| | | 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, |
| | |
| | | this.curFuncIndex = -1; |
| | | store.setTdglFlag(false); |
| | | if (window.tdglLayer) { |
| | | store.setSliderShow(false); |
| | | sgworld.Creator.DeleteObject(window.tdglLayer); |
| | | } |
| | | store.setHistoryShow(true); |
| | |
| | | "basicMapChecked.val": { |
| | | handler: function (newVal, oldVal) { |
| | | if (newVal == "三维模型") { |
| | | debugger; |
| | | this.handleSMapClick( |
| | | { |
| | | id: "swmx", |