| | |
| | | methods: { |
| | | ChangeBaseLayer(name) { |
| | | this.currYX = name |
| | | Viewer.imageryLayers._layers[1].show = false |
| | | // Viewer.imageryLayers._layers[2].show = false |
| | | // Viewer.imageryLayers._layers[3].show = false |
| | | |
| | | if (is_production) { |
| | | Viewer.imageryLayers._layers[2].show = false |
| | | Viewer.imageryLayers._layers[1].show = false |
| | | } else { |
| | | Viewer.imageryLayers._layers[1].show = false |
| | | |
| | | } |
| | | |
| | | if (yunxuanLayer) { |
| | | Viewer.imageryLayers.remove(yunxuanLayer); |
| | | yunxuanLayer = null |
| | |
| | | // ) |
| | | var urls = "http://t0.tianditu.com/ter_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=ter&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk="; |
| | | var tokne = "94a34772eb88317fcbf8428e10448561" |
| | | yunxuanLayer = Viewer.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider({ |
| | | url: urls + tokne, |
| | | layer: "tdtImgLayer", |
| | | style: "default", |
| | | format: "image/jpeg", |
| | | tileMatrixSetID: "GoogleMapsCompatible", |
| | | })) |
| | | Viewer.imageryLayers.lowerToBottom(yunxuanLayer);//将图层移到最底层 |
| | | if (is_production) { |
| | | var baseUrl_yx = window.sceneConfig.baseUrl_yx; |
| | | if (baseUrl_yx.indexOf('{host}') > -1) { |
| | | baseUrl_yx = baseUrl_yx.replace("{host}", iisHost) |
| | | } |
| | | |
| | | yunxuanLayer = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: baseUrl_yx, |
| | | maximumLevel: 22, |
| | | }) |
| | | ); |
| | | } else { |
| | | yunxuanLayer = Viewer.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider({ |
| | | url: urls + tokne, |
| | | layer: "tdtImgLayer", |
| | | style: "default", |
| | | format: "image/jpeg", |
| | | tileMatrixSetID: "GoogleMapsCompatible", |
| | | })) |
| | | } |
| | | |
| | | |
| | | Viewer.imageryLayers.lowerToBottom(yunxuanLayer);//将图层移到最底层 |
| | | Viewer.imageryLayers.raise(yunxuanLayer);//将图层上移一层 |
| | | } |
| | | |
| | |
| | | |
| | | break |
| | | case "影像图": |
| | | Viewer.imageryLayers._layers[2].show = true |
| | | |
| | | if (is_production) { |
| | | Viewer.imageryLayers._layers[1].show = true |
| | | } |
| | | break |
| | | case "注记图": |
| | | Viewer.imageryLayers._layers[1].show = true |
| | | |
| | | if (is_production) { |
| | | Viewer.imageryLayers._layers[2].show = true |
| | | } else { |
| | | Viewer.imageryLayers._layers[1].show = true |
| | | } |
| | | break |
| | | default: |
| | | break |
| | |
| | | background: url(~@/assets/img/Screen/centerbtn.png); |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | font-size: 1rem; |
| | | font-size: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |