diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index e49e058..17be5f4 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -84,10 +84,10 @@ layername: 'topography', show: false, }, - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'builtCity', show: true, @@ -109,10 +109,10 @@ const showCenterCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -138,10 +138,10 @@ const showBuiltCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -166,10 +166,10 @@ }; const showOneCenterLayer = () => { bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index e49e058..17be5f4 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -84,10 +84,10 @@ layername: 'topography', show: false, }, - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'builtCity', show: true, @@ -109,10 +109,10 @@ const showCenterCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -138,10 +138,10 @@ const showBuiltCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -166,10 +166,10 @@ }; const showOneCenterLayer = () => { bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 5ec15ac..26d2dc8 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -55,14 +55,14 @@ pitch: -25.2508969308367, roll: 0.005453465256790101, }); - setTimeout(() => { - bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: false, - }, - ]); - }, 5000); + // setTimeout(() => { + // bus.emit('setIniteLayer', [ + // { + // layername: 'buildingModel', + // show: false, + // }, + // ]); + // }, 5000); }); onBeforeUnmount(() => { if (!newfiberMap) return; diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index e49e058..17be5f4 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -84,10 +84,10 @@ layername: 'topography', show: false, }, - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'builtCity', show: true, @@ -109,10 +109,10 @@ const showCenterCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -138,10 +138,10 @@ const showBuiltCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -166,10 +166,10 @@ }; const showOneCenterLayer = () => { bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 5ec15ac..26d2dc8 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -55,14 +55,14 @@ pitch: -25.2508969308367, roll: 0.005453465256790101, }); - setTimeout(() => { - bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: false, - }, - ]); - }, 5000); + // setTimeout(() => { + // bus.emit('setIniteLayer', [ + // { + // layername: 'buildingModel', + // show: false, + // }, + // ]); + // }, 5000); }); onBeforeUnmount(() => { if (!newfiberMap) return; diff --git a/src/views/sponeScreen/gisMF/cesiumMap.vue b/src/views/sponeScreen/gisMF/cesiumMap.vue index 19bb9a7..db88b01 100644 --- a/src/views/sponeScreen/gisMF/cesiumMap.vue +++ b/src/views/sponeScreen/gisMF/cesiumMap.vue @@ -23,13 +23,14 @@ }); // newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.TC_BLACK]); // changeMapStyle.mapSetImageStyle(newfiberMap); - var layer = new NewFiberMap.Layer.MVTImageryProvider({ - style: blue_vector, - tileSize: 1024, - }); - layer.newfiberId = 'blackMap'; - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + // var layer = new NewFiberMap.Layer.MVTImageryProvider({ + // style: blue_vector, + // tileSize: 1024, + // }); + // layer.newfiberId = 'blackMap'; + // newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); + // newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.AMAP_VECTOR_V2]); newfiberMap.setView({ lng: 114.312, lat: 34.502, diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index e49e058..17be5f4 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -84,10 +84,10 @@ layername: 'topography', show: false, }, - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'builtCity', show: true, @@ -109,10 +109,10 @@ const showCenterCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -138,10 +138,10 @@ const showBuiltCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -166,10 +166,10 @@ }; const showOneCenterLayer = () => { bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 5ec15ac..26d2dc8 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -55,14 +55,14 @@ pitch: -25.2508969308367, roll: 0.005453465256790101, }); - setTimeout(() => { - bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: false, - }, - ]); - }, 5000); + // setTimeout(() => { + // bus.emit('setIniteLayer', [ + // { + // layername: 'buildingModel', + // show: false, + // }, + // ]); + // }, 5000); }); onBeforeUnmount(() => { if (!newfiberMap) return; diff --git a/src/views/sponeScreen/gisMF/cesiumMap.vue b/src/views/sponeScreen/gisMF/cesiumMap.vue index 19bb9a7..db88b01 100644 --- a/src/views/sponeScreen/gisMF/cesiumMap.vue +++ b/src/views/sponeScreen/gisMF/cesiumMap.vue @@ -23,13 +23,14 @@ }); // newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.TC_BLACK]); // changeMapStyle.mapSetImageStyle(newfiberMap); - var layer = new NewFiberMap.Layer.MVTImageryProvider({ - style: blue_vector, - tileSize: 1024, - }); - layer.newfiberId = 'blackMap'; - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + // var layer = new NewFiberMap.Layer.MVTImageryProvider({ + // style: blue_vector, + // tileSize: 1024, + // }); + // layer.newfiberId = 'blackMap'; + // newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); + // newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.AMAP_VECTOR_V2]); newfiberMap.setView({ lng: 114.312, lat: 34.502, diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index 293e7fb..ebb14b3 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -139,14 +139,14 @@ children: [ [ { - isCheck: false, + isCheck: true, name: '白色地图', url: 'whiteMap_icon.png', layername: 'whiteMap', type: 'background', }, { - isCheck: true, + isCheck: false, name: '深色地图', url: 'blackMap_icon.png', layername: 'blackMap', @@ -163,14 +163,21 @@ }, { isCheck: false, - name: '三维建筑', - url: 'building_icon.png', - layername: 'buildingModel', - type: '3dModel', - data: [ - 'https://server1.wh-nf.cn:9000/newfiber-standard-kaifeng/2024/06/24/kaifengBuilding/kaifengBuilding/kaifengBuilding.scp', - ], + name: '气象云图', + url: 'paiShuiArea3_icon.png', + layername: 'weather_cloud', + type: 'weather_cloud', }, + // { + // isCheck: false, + // name: '三维建筑', + // url: 'building_icon.png', + // layername: 'buildingModel', + // type: '3dModel', + // data: [ + // 'https://server1.wh-nf.cn:9000/newfiber-standard-kaifeng/2024/06/24/kaifengBuilding/kaifengBuilding/kaifengBuilding.scp', + // ], + // }, ], [ { @@ -248,13 +255,13 @@ layername: 'cesiumPaishuiArea3', type: 'cesiumPaishuiArea', }, - { - isCheck: false, - name: '气象云图', - url: 'paiShuiArea3_icon.png', - layername: 'weather_cloud', - type: 'weather_cloud', - }, + // { + // isCheck: false, + // name: '气象云图', + // url: 'paiShuiArea3_icon.png', + // layername: 'weather_cloud', + // type: 'weather_cloud', + // }, ], ], }, diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index e49e058..17be5f4 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -84,10 +84,10 @@ layername: 'topography', show: false, }, - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'builtCity', show: true, @@ -109,10 +109,10 @@ const showCenterCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -138,10 +138,10 @@ const showBuiltCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -166,10 +166,10 @@ }; const showOneCenterLayer = () => { bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 5ec15ac..26d2dc8 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -55,14 +55,14 @@ pitch: -25.2508969308367, roll: 0.005453465256790101, }); - setTimeout(() => { - bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: false, - }, - ]); - }, 5000); + // setTimeout(() => { + // bus.emit('setIniteLayer', [ + // { + // layername: 'buildingModel', + // show: false, + // }, + // ]); + // }, 5000); }); onBeforeUnmount(() => { if (!newfiberMap) return; diff --git a/src/views/sponeScreen/gisMF/cesiumMap.vue b/src/views/sponeScreen/gisMF/cesiumMap.vue index 19bb9a7..db88b01 100644 --- a/src/views/sponeScreen/gisMF/cesiumMap.vue +++ b/src/views/sponeScreen/gisMF/cesiumMap.vue @@ -23,13 +23,14 @@ }); // newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.TC_BLACK]); // changeMapStyle.mapSetImageStyle(newfiberMap); - var layer = new NewFiberMap.Layer.MVTImageryProvider({ - style: blue_vector, - tileSize: 1024, - }); - layer.newfiberId = 'blackMap'; - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + // var layer = new NewFiberMap.Layer.MVTImageryProvider({ + // style: blue_vector, + // tileSize: 1024, + // }); + // layer.newfiberId = 'blackMap'; + // newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); + // newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.AMAP_VECTOR_V2]); newfiberMap.setView({ lng: 114.312, lat: 34.502, diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index 293e7fb..ebb14b3 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -139,14 +139,14 @@ children: [ [ { - isCheck: false, + isCheck: true, name: '白色地图', url: 'whiteMap_icon.png', layername: 'whiteMap', type: 'background', }, { - isCheck: true, + isCheck: false, name: '深色地图', url: 'blackMap_icon.png', layername: 'blackMap', @@ -163,14 +163,21 @@ }, { isCheck: false, - name: '三维建筑', - url: 'building_icon.png', - layername: 'buildingModel', - type: '3dModel', - data: [ - 'https://server1.wh-nf.cn:9000/newfiber-standard-kaifeng/2024/06/24/kaifengBuilding/kaifengBuilding/kaifengBuilding.scp', - ], + name: '气象云图', + url: 'paiShuiArea3_icon.png', + layername: 'weather_cloud', + type: 'weather_cloud', }, + // { + // isCheck: false, + // name: '三维建筑', + // url: 'building_icon.png', + // layername: 'buildingModel', + // type: '3dModel', + // data: [ + // 'https://server1.wh-nf.cn:9000/newfiber-standard-kaifeng/2024/06/24/kaifengBuilding/kaifengBuilding/kaifengBuilding.scp', + // ], + // }, ], [ { @@ -248,13 +255,13 @@ layername: 'cesiumPaishuiArea3', type: 'cesiumPaishuiArea', }, - { - isCheck: false, - name: '气象云图', - url: 'paiShuiArea3_icon.png', - layername: 'weather_cloud', - type: 'weather_cloud', - }, + // { + // isCheck: false, + // name: '气象云图', + // url: 'paiShuiArea3_icon.png', + // layername: 'weather_cloud', + // type: 'weather_cloud', + // }, ], ], }, diff --git a/src/views/sponeScreen/gisMF/changeMapStyle.js b/src/views/sponeScreen/gisMF/changeMapStyle.js index d9b11f9..9bd106c 100644 --- a/src/views/sponeScreen/gisMF/changeMapStyle.js +++ b/src/views/sponeScreen/gisMF/changeMapStyle.js @@ -7,24 +7,15 @@ .getMap() .imageryLayers._layers.filter( layer => - layer.imageryProvider.newfiberId == 'blackMap' || (layer.imageryProvider.url && layer.imageryProvider.url.includes('webst0')) + layer.imageryProvider.newfiberId == 'blackMap' || (layer.imageryProvider.url && layer.imageryProvider.url.includes('style=6')) ); - let selectedLayer = newfiberMap.getMap().imageryLayers._layers.filter(layer => layer.imageryProvider.newfiberId == 'whiteMap'); + let selectedLayer = newfiberMap + .getMap() + .imageryLayers._layers.filter(layer => layer.imageryProvider.url && layer.imageryProvider.url.includes('style=7')); removedLayers.forEach(layer => { layer.show = false; }); - if (!selectedLayer[0]) { - var layer = new NewFiberMap.Layer.MVTImageryProvider({ - style: white_vector, - tileSize: 1024, - }); - layer.newfiberId = 'whiteMap'; - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(238,251,255,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer); - } else { - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(238,251,255,1)'); - selectedLayer[0].show = true; - } + selectedLayer[0].show = true; } //地图深色风格 static mapSetBlueStyle(newfiberMap) { @@ -56,11 +47,12 @@ let removedLayers = newfiberMap .getMap() .imageryLayers._layers.filter( - layer => layer.imageryProvider.newfiberId == 'whiteMap' || layer.imageryProvider.newfiberId == 'blackMap' + layer => + layer.imageryProvider.newfiberId == 'whiteMap' || (layer.imageryProvider.url && layer.imageryProvider.url.includes('style=7')) ); let selectedLayer = newfiberMap .getMap() - .imageryLayers._layers.filter(layer => layer.imageryProvider.url && layer.imageryProvider.url.includes('webst0')); + .imageryLayers._layers.filter(layer => layer.imageryProvider.url && layer.imageryProvider.url.includes('style=6')); removedLayers.forEach(layer => { layer.show = false; }); diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index e49e058..17be5f4 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -84,10 +84,10 @@ layername: 'topography', show: false, }, - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'builtCity', show: true, @@ -109,10 +109,10 @@ const showCenterCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -138,10 +138,10 @@ const showBuiltCity = () => { newfiberMap.removeByIds(['oneCenter']); bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, @@ -166,10 +166,10 @@ }; const showOneCenterLayer = () => { bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: true, - }, + // { + // layername: 'buildingModel', + // show: true, + // }, { layername: 'topography', show: true, diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 5ec15ac..26d2dc8 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -55,14 +55,14 @@ pitch: -25.2508969308367, roll: 0.005453465256790101, }); - setTimeout(() => { - bus.emit('setIniteLayer', [ - { - layername: 'buildingModel', - show: false, - }, - ]); - }, 5000); + // setTimeout(() => { + // bus.emit('setIniteLayer', [ + // { + // layername: 'buildingModel', + // show: false, + // }, + // ]); + // }, 5000); }); onBeforeUnmount(() => { if (!newfiberMap) return; diff --git a/src/views/sponeScreen/gisMF/cesiumMap.vue b/src/views/sponeScreen/gisMF/cesiumMap.vue index 19bb9a7..db88b01 100644 --- a/src/views/sponeScreen/gisMF/cesiumMap.vue +++ b/src/views/sponeScreen/gisMF/cesiumMap.vue @@ -23,13 +23,14 @@ }); // newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.TC_BLACK]); // changeMapStyle.mapSetImageStyle(newfiberMap); - var layer = new NewFiberMap.Layer.MVTImageryProvider({ - style: blue_vector, - tileSize: 1024, - }); - layer.newfiberId = 'blackMap'; - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + // var layer = new NewFiberMap.Layer.MVTImageryProvider({ + // style: blue_vector, + // tileSize: 1024, + // }); + // layer.newfiberId = 'blackMap'; + // newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(8,27,54,1)'); + // newfiberMap.getMap().imageryLayers.addImageryProvider(layer); + newfiberMap.setBaseMapByEnum([NewFiberMap.Enum.BaseMap.AMAP_VECTOR_V2]); newfiberMap.setView({ lng: 114.312, lat: 34.502, diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index 293e7fb..ebb14b3 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -139,14 +139,14 @@ children: [ [ { - isCheck: false, + isCheck: true, name: '白色地图', url: 'whiteMap_icon.png', layername: 'whiteMap', type: 'background', }, { - isCheck: true, + isCheck: false, name: '深色地图', url: 'blackMap_icon.png', layername: 'blackMap', @@ -163,14 +163,21 @@ }, { isCheck: false, - name: '三维建筑', - url: 'building_icon.png', - layername: 'buildingModel', - type: '3dModel', - data: [ - 'https://server1.wh-nf.cn:9000/newfiber-standard-kaifeng/2024/06/24/kaifengBuilding/kaifengBuilding/kaifengBuilding.scp', - ], + name: '气象云图', + url: 'paiShuiArea3_icon.png', + layername: 'weather_cloud', + type: 'weather_cloud', }, + // { + // isCheck: false, + // name: '三维建筑', + // url: 'building_icon.png', + // layername: 'buildingModel', + // type: '3dModel', + // data: [ + // 'https://server1.wh-nf.cn:9000/newfiber-standard-kaifeng/2024/06/24/kaifengBuilding/kaifengBuilding/kaifengBuilding.scp', + // ], + // }, ], [ { @@ -248,13 +255,13 @@ layername: 'cesiumPaishuiArea3', type: 'cesiumPaishuiArea', }, - { - isCheck: false, - name: '气象云图', - url: 'paiShuiArea3_icon.png', - layername: 'weather_cloud', - type: 'weather_cloud', - }, + // { + // isCheck: false, + // name: '气象云图', + // url: 'paiShuiArea3_icon.png', + // layername: 'weather_cloud', + // type: 'weather_cloud', + // }, ], ], }, diff --git a/src/views/sponeScreen/gisMF/changeMapStyle.js b/src/views/sponeScreen/gisMF/changeMapStyle.js index d9b11f9..9bd106c 100644 --- a/src/views/sponeScreen/gisMF/changeMapStyle.js +++ b/src/views/sponeScreen/gisMF/changeMapStyle.js @@ -7,24 +7,15 @@ .getMap() .imageryLayers._layers.filter( layer => - layer.imageryProvider.newfiberId == 'blackMap' || (layer.imageryProvider.url && layer.imageryProvider.url.includes('webst0')) + layer.imageryProvider.newfiberId == 'blackMap' || (layer.imageryProvider.url && layer.imageryProvider.url.includes('style=6')) ); - let selectedLayer = newfiberMap.getMap().imageryLayers._layers.filter(layer => layer.imageryProvider.newfiberId == 'whiteMap'); + let selectedLayer = newfiberMap + .getMap() + .imageryLayers._layers.filter(layer => layer.imageryProvider.url && layer.imageryProvider.url.includes('style=7')); removedLayers.forEach(layer => { layer.show = false; }); - if (!selectedLayer[0]) { - var layer = new NewFiberMap.Layer.MVTImageryProvider({ - style: white_vector, - tileSize: 1024, - }); - layer.newfiberId = 'whiteMap'; - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(238,251,255,1)'); - newfiberMap.getMap().imageryLayers.addImageryProvider(layer); - } else { - newfiberMap.getMap().scene.globe.baseColor = Cesium.Color.fromCssColorString('rgba(238,251,255,1)'); - selectedLayer[0].show = true; - } + selectedLayer[0].show = true; } //地图深色风格 static mapSetBlueStyle(newfiberMap) { @@ -56,11 +47,12 @@ let removedLayers = newfiberMap .getMap() .imageryLayers._layers.filter( - layer => layer.imageryProvider.newfiberId == 'whiteMap' || layer.imageryProvider.newfiberId == 'blackMap' + layer => + layer.imageryProvider.newfiberId == 'whiteMap' || (layer.imageryProvider.url && layer.imageryProvider.url.includes('style=7')) ); let selectedLayer = newfiberMap .getMap() - .imageryLayers._layers.filter(layer => layer.imageryProvider.url && layer.imageryProvider.url.includes('webst0')); + .imageryLayers._layers.filter(layer => layer.imageryProvider.url && layer.imageryProvider.url.includes('style=6')); removedLayers.forEach(layer => { layer.show = false; }); diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 8f2b794..00c3118 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -140,11 +140,11 @@ newfiberVectorLayer.setDynamicWaterVisible(item.isCheck); } } - if (item.type == '3dModel') { - item.data.forEach((url, index) => { - newfiberVectorLayer.add3DModelLayers(newfiberMap, url, item.layername + index); - }); - } + // if (item.type == '3dModel') { + // item.data.forEach((url, index) => { + // newfiberVectorLayer.add3DModelLayers(newfiberMap, url, item.layername + index); + // }); + // } if (item.type == 'point') { newfiberVectorLayer.addGeojsonPoint(newfiberMap, item.data, getImageUrl(item.url, 'cesiumMap/legendIcon'), item.layername); if (item.dataArea) { @@ -180,11 +180,11 @@ if (item.layername == 'dynamicWater') { newfiberVectorLayer.setDynamicWaterVisible(item.isCheck); } - if (item.type == '3dModel') { - item.data.forEach((url, index) => { - newfiberVectorLayer.set3DModelVisible(item.layername + index, item.isCheck); - }); - } + // if (item.type == '3dModel') { + // item.data.forEach((url, index) => { + // newfiberVectorLayer.set3DModelVisible(item.layername + index, item.isCheck); + // }); + // } newfiberMap.removeByIds([item.layername]); if (rainDataTimer.value) { clearInterval(rainDataTimer.value);