diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 43834ab..1c231a6 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -50,6 +50,8 @@ import oneCenter2 from '@/assets/geojson/kaifeng/oneCenter2.json'; import newfiberVectorLayer from '@/views/sponeScreen/gisMF/newfiberVectorLayer.js'; import bus from '@/bus/index'; +import newfiberMapBoxVectorLayer from '@/views/sponeScreen/gisMF/mapboxVectorLayer.js'; +const wmsVisibility = ref(false); const policiesList = ref([ { name: '一心', @@ -196,17 +198,24 @@ }); }; const setLayerVisible = () => { - newfiberMap.removeByIds(['oneCenter']); - if (!newfiberMap.xdmWms) { - newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ - url: '/geoserver/demo/wms', - layers: 'demo:hn_kf_hm_dilei', - visible: true, - }); - return; - } - let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; - imageryProvider.show = !!!imageryProvider.show; + wmsVisibility.value = !wmsVisibility.value; + // newfiberMap.removeByIds(['oneCenter']); + // if (!newfiberMap.xdmWms) { + // newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ + // url: '/geoserver/demo/wms', + // layers: 'demo:hn_kf_hm_dilei', + // visible: true, + // }); + // return; + // } + // let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; + // imageryProvider.show = !!!imageryProvider.show; + newfiberMapBoxVectorLayer.addWMSLayer('demo:hn_kf_hm_dilei'); + // if (wmsVisibility.value) { + // newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'visible'); + // } else { + // newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + // } }; onMounted(() => { diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 43834ab..1c231a6 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -50,6 +50,8 @@ import oneCenter2 from '@/assets/geojson/kaifeng/oneCenter2.json'; import newfiberVectorLayer from '@/views/sponeScreen/gisMF/newfiberVectorLayer.js'; import bus from '@/bus/index'; +import newfiberMapBoxVectorLayer from '@/views/sponeScreen/gisMF/mapboxVectorLayer.js'; +const wmsVisibility = ref(false); const policiesList = ref([ { name: '一心', @@ -196,17 +198,24 @@ }); }; const setLayerVisible = () => { - newfiberMap.removeByIds(['oneCenter']); - if (!newfiberMap.xdmWms) { - newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ - url: '/geoserver/demo/wms', - layers: 'demo:hn_kf_hm_dilei', - visible: true, - }); - return; - } - let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; - imageryProvider.show = !!!imageryProvider.show; + wmsVisibility.value = !wmsVisibility.value; + // newfiberMap.removeByIds(['oneCenter']); + // if (!newfiberMap.xdmWms) { + // newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ + // url: '/geoserver/demo/wms', + // layers: 'demo:hn_kf_hm_dilei', + // visible: true, + // }); + // return; + // } + // let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; + // imageryProvider.show = !!!imageryProvider.show; + newfiberMapBoxVectorLayer.addWMSLayer('demo:hn_kf_hm_dilei'); + // if (wmsVisibility.value) { + // newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'visible'); + // } else { + // newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + // } }; onMounted(() => { diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index ba23b0b..218bc07 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -166,37 +166,11 @@ }, { isCheck: false, - name: '深色地图', - url: 'blackMap_icon.png', - layername: 'blackMap', - type: 'background', - }, - ], - [ - { - isCheck: false, name: '影像图', url: 'imageMap_icon.png', layername: 'imageMap', type: 'background', }, - { - isCheck: false, - 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', - // ], - // }, ], [ { @@ -215,6 +189,16 @@ type: 'areaWall', data: builtCity, }, + // { + // 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', + // ], + // }, ], [ { @@ -227,11 +211,10 @@ }, { isCheck: false, - name: '河湖水系', - url: 'dynamicWater_icon.png', - layername: 'dynamicWater', - type: 'dynamicWater', - data: riverLake, + name: '气象云图', + url: 'paiShuiArea3_icon.png', + layername: 'weather_cloud', + type: 'weather_cloud', }, ], [ @@ -375,16 +358,6 @@ }, { isCheck: false, - name: '雨水井', - layername: 'henan_kaifeng_yspoint', - url: 'ysj.svg', - type: 'mapServer', - //data: pipeFlow, - }, - ], - [ - { - isCheck: false, name: '污水管网', layername: 'wsLine1', //图层+json √ url: 'sewageLine_icon.png', @@ -394,14 +367,6 @@ //data: wuShuiChang, //dataArea: wscArea, }, - { - isCheck: false, - name: '污水井', - layername: 'henan_kaifeng_wspoint', - url: 'wsj.svg', - type: 'mapServer', - //data: pipeFlow, - }, ], [ { @@ -415,28 +380,7 @@ //data: wuShuiChang, //dataArea: wscArea, }, - { - isCheck: false, - name: '合流井', - layername: 'henan_kaifeng_hspoint', - url: 'hsj.svg', - type: 'mapServer', - //data: pipeFlow, - }, ], - // [ - // { - // isCheck: false, - // name: '路网标注', - // layername: 'roadLabel', //图层+json √ - // url: 'pipeLineFlow_icon.png', - // //mapUrl: 'WSC.png', - // type: 'basicMap', - // //data: WSCLC, - // //data: wuShuiChang, - // //dataArea: wscArea, - // }, - // ], ], }, { diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index 43834ab..1c231a6 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -50,6 +50,8 @@ import oneCenter2 from '@/assets/geojson/kaifeng/oneCenter2.json'; import newfiberVectorLayer from '@/views/sponeScreen/gisMF/newfiberVectorLayer.js'; import bus from '@/bus/index'; +import newfiberMapBoxVectorLayer from '@/views/sponeScreen/gisMF/mapboxVectorLayer.js'; +const wmsVisibility = ref(false); const policiesList = ref([ { name: '一心', @@ -196,17 +198,24 @@ }); }; const setLayerVisible = () => { - newfiberMap.removeByIds(['oneCenter']); - if (!newfiberMap.xdmWms) { - newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ - url: '/geoserver/demo/wms', - layers: 'demo:hn_kf_hm_dilei', - visible: true, - }); - return; - } - let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; - imageryProvider.show = !!!imageryProvider.show; + wmsVisibility.value = !wmsVisibility.value; + // newfiberMap.removeByIds(['oneCenter']); + // if (!newfiberMap.xdmWms) { + // newfiberMap.xdmWms = newfiberMap.loadWmsLayer({ + // url: '/geoserver/demo/wms', + // layers: 'demo:hn_kf_hm_dilei', + // visible: true, + // }); + // return; + // } + // let imageryProvider = newfiberMap.getLayers([newfiberMap.xdmWms])[0]; + // imageryProvider.show = !!!imageryProvider.show; + newfiberMapBoxVectorLayer.addWMSLayer('demo:hn_kf_hm_dilei'); + // if (wmsVisibility.value) { + // newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'visible'); + // } else { + // newfiberMapbox.map.setLayoutProperty('demo:hn_kf_hm_dilei', 'visibility', 'none'); + // } }; onMounted(() => { diff --git a/src/views/sponeScreen/gisMF/cesiumMapLegend.js b/src/views/sponeScreen/gisMF/cesiumMapLegend.js index ba23b0b..218bc07 100644 --- a/src/views/sponeScreen/gisMF/cesiumMapLegend.js +++ b/src/views/sponeScreen/gisMF/cesiumMapLegend.js @@ -166,37 +166,11 @@ }, { isCheck: false, - name: '深色地图', - url: 'blackMap_icon.png', - layername: 'blackMap', - type: 'background', - }, - ], - [ - { - isCheck: false, name: '影像图', url: 'imageMap_icon.png', layername: 'imageMap', type: 'background', }, - { - isCheck: false, - 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', - // ], - // }, ], [ { @@ -215,6 +189,16 @@ type: 'areaWall', data: builtCity, }, + // { + // 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', + // ], + // }, ], [ { @@ -227,11 +211,10 @@ }, { isCheck: false, - name: '河湖水系', - url: 'dynamicWater_icon.png', - layername: 'dynamicWater', - type: 'dynamicWater', - data: riverLake, + name: '气象云图', + url: 'paiShuiArea3_icon.png', + layername: 'weather_cloud', + type: 'weather_cloud', }, ], [ @@ -375,16 +358,6 @@ }, { isCheck: false, - name: '雨水井', - layername: 'henan_kaifeng_yspoint', - url: 'ysj.svg', - type: 'mapServer', - //data: pipeFlow, - }, - ], - [ - { - isCheck: false, name: '污水管网', layername: 'wsLine1', //图层+json √ url: 'sewageLine_icon.png', @@ -394,14 +367,6 @@ //data: wuShuiChang, //dataArea: wscArea, }, - { - isCheck: false, - name: '污水井', - layername: 'henan_kaifeng_wspoint', - url: 'wsj.svg', - type: 'mapServer', - //data: pipeFlow, - }, ], [ { @@ -415,28 +380,7 @@ //data: wuShuiChang, //dataArea: wscArea, }, - { - isCheck: false, - name: '合流井', - layername: 'henan_kaifeng_hspoint', - url: 'hsj.svg', - type: 'mapServer', - //data: pipeFlow, - }, ], - // [ - // { - // isCheck: false, - // name: '路网标注', - // layername: 'roadLabel', //图层+json √ - // url: 'pipeLineFlow_icon.png', - // //mapUrl: 'WSC.png', - // type: 'basicMap', - // //data: WSCLC, - // //data: wuShuiChang, - // //dataArea: wscArea, - // }, - // ], ], }, { diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index a794e31..850382e 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -34,6 +34,7 @@