| | |
| | | </template> |
| | | |
| | | <script> |
| | | let yunxuanLayer = null |
| | | let yunxuanLayer = null;
|
| | | export default { |
| | | name: "", |
| | | components: {}, |
| | | data() { |
| | | return {} |
| | | return {};
|
| | | }, |
| | | mounted() { |
| | | |
| | | this.init3DMap() |
| | | this.init3DMap();
|
| | | // this.$bus.$on("changeProject", name => { |
| | | // if (!yunxuanLayer) { |
| | | // var urls = "https://tiles3.geovisearth.com/base/v1/ter" |
| | |
| | | // ) |
| | | this.$store.state.showThematicFlag = false; |
| | | window.sgworld = new SmartEarth.SGWorld("Centermapdiv", { |
| | | |
| | | licenseServer: window.sceneConfig.licenseServer, |
| | | licenseServer: window.sceneConfig.licenseServer
|
| | | }); |
| | | window.viewer = window.Viewer = window.sgworld._Viewer; |
| | | if (is_production) { |
| | |
| | | } |
| | | |
| | | // Viewer.imageryLayers._layers[0].show = false |
| | | sgworld.Navigate.jumpTo({ //跳转视角 |
| | | sgworld.Navigate.jumpTo({
|
| | | //跳转视角
|
| | | destination: new Cesium.Cartesian3.fromDegrees(110, 32, 50000000) |
| | | }); |
| | | setTimeout(() => { |
| | |
| | | destination: new Cesium.Cartesian3.fromDegrees(110, 32, 20000000), |
| | | orientation: { |
| | | heading: Cesium.Math.toRadians(0), |
| | | pitch: Cesium.Math.toRadians(-90), |
| | | pitch: Cesium.Math.toRadians(-90)
|
| | | } |
| | | }) |
| | | });
|
| | | }, 1000); |
| | | |
| | | if (is_production) { |
| | | |
| | | var base_ulr = window.sceneConfig.baseUrl; |
| | | if (base_ulr.indexOf('{host}') > -1) { |
| | | base_ulr = base_ulr.replace("{host}", iisHost) |
| | | if (base_ulr.indexOf("{host}") > -1) {
|
| | | base_ulr = base_ulr.replace("{host}", iisHost);
|
| | | } |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | |
| | | ); |
| | | window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: base_ulr, |
| | | url: base_ulr
|
| | | }) |
| | | ); |
| | | var base_ulr_sl = window.sceneConfig.baseUrl_sl; |
| | | if (base_ulr_sl.indexOf('{host}') > -1) { |
| | | base_ulr_sl = base_ulr_sl.replace("{host}", iisHost) |
| | | if (base_ulr_sl.indexOf("{host}") > -1) {
|
| | | base_ulr_sl = base_ulr_sl.replace("{host}", iisHost);
|
| | | } |
| | | window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: base_ulr_sl, |
| | | |
| | | url: base_ulr_sl
|
| | | }) |
| | | ); |
| | | Viewer.imageryLayers._layers[2].show = false |
| | | Viewer.imageryLayers._layers[2].show = false;
|
| | | this.$store.state.showThematicFlag = true; |
| | | } else { |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: gaoDeBaseUrl[0].url, |
| | | url: gaoDeBaseUrl[0].url
|
| | | }) |
| | | ) |
| | | );
|
| | | |
| | | // Viewer.imageryLayers.addImageryProvider( |
| | | // new Cesium.UrlTemplateImageryProvider({ |
| | |
| | | this.$store.state.showThematicFlag = true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | Viewer._enableInfoOrSelection = false |
| | | Viewer._enableInfoOrSelection = false;
|
| | | //显示fps |
| | | Viewer.scene.debugShowFramesPerSecond = false |
| | | Viewer.scene.debugShowFramesPerSecond = false;
|
| | | //导航控件 |
| | | window.sgworld.navControl("nav", false) |
| | | window.sgworld.navControl("nav", false);
|
| | | //比例尺 |
| | | window.sgworld.navControl("scale", false) |
| | | window.sgworld.navControl("scale", false);
|
| | | //开启深度检测 |
| | | sgworld.Analysis.depthTestAgainstTerrain(true) |
| | | sgworld.Analysis.depthTestAgainstTerrain(true);
|
| | | |
| | | // Viewer.terrainProvider = new Cesium.CesiumTerrainProvider({ |
| | | // url: demLayer, |
| | | // }) |
| | | |
| | | // var option = { |
| | | // url: window.sceneConfig.SGUrl, |
| | | // layerName: window.sceneConfig.mptName, |
| | | // requestVertexNormals: true, |
| | | // }; |
| | | // window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, ""); |
| | | var option = {
|
| | | url: window.sceneConfig.SGUrl,
|
| | | layerName: window.sceneConfig.mptName,
|
| | | requestVertexNormals: true
|
| | | };
|
| | | window.terrainLayer = sgworld.Creator.sfsterrainprovider(
|
| | | "",
|
| | | option,
|
| | | "",
|
| | | true,
|
| | | ""
|
| | | );
|
| | | //改变天空颜色为黑色 |
| | | Viewer.scene.skyBox.show = false //关闭天空盒,否则会显示天空颜色 |
| | | Viewer.scene.skyBox.show = false; //关闭天空盒,否则会显示天空颜色
|
| | | //背景透明 |
| | | Viewer.scene.backgroundColor = new Cesium.Color(0.0, 0.0, 0.0, 0.0) |
| | | }, |
| | | }, |
| | | Viewer.scene.backgroundColor = new Cesium.Color(0.0, 0.0, 0.0, 0.0);
|
| | | } |
| | | }
|
| | | };
|
| | | </script> |
| | | |
| | | <style scoped lang="less"> |