From ba572e4a47da5531807446f2e293b6ffcffb5cae Mon Sep 17 00:00:00 2001 From: helloxujingliang <3225043@qq.com> Date: Thu, 8 Aug 2024 18:27:10 +0800 Subject: [PATCH] merge --- .../sys/exception/LargeScreenMap/config.ts | 4 ++++ .../sys/exception/LargeScreenMap/index.vue | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/views/sys/exception/LargeScreenMap/config.ts b/src/views/sys/exception/LargeScreenMap/config.ts index 7d006c87..3a5caa5c 100644 --- a/src/views/sys/exception/LargeScreenMap/config.ts +++ b/src/views/sys/exception/LargeScreenMap/config.ts @@ -58,6 +58,10 @@ export const MAP_VIEWER = { "莒南县":{ center:{lng: 118.96807389575793, lat: 35.186365164136504}, zoom:9.848587811931848, + }, + "临港区":{ + center:{lng: 119.113001, lat: 35.204748}, + zoom:10.848587811931848, } } diff --git a/src/views/sys/exception/LargeScreenMap/index.vue b/src/views/sys/exception/LargeScreenMap/index.vue index bc76b5fb..b04a0a5c 100644 --- a/src/views/sys/exception/LargeScreenMap/index.vue +++ b/src/views/sys/exception/LargeScreenMap/index.vue @@ -76,15 +76,6 @@ const initMap = () => { layout: { visibility: 'visible', } - },{ - id: 'dianzi', - type: 'raster', - source: 'dianzi', - minzoom: 0, - maxzoom: 18, - layout: { - visibility: 'visible', - } },{ id: 'weixing', type: 'raster', @@ -104,6 +95,15 @@ const initMap = () => { layout: { visibility: 'none', } + },{ + id: 'dianzi', + type: 'raster', + source: 'dianzi', + minzoom: 0, + maxzoom: 18, + layout: { + visibility: 'visible', + } } ], }, @@ -474,6 +474,7 @@ const handlerDealCountry = (countyName:String = "临沂市"):void=>{ handlerLoadCountyLayer(res.data); }); } else if(countyName){ + center = MAP_VIEWER[countyName].center; zoom = MAP_VIEWER[countyName].zoom; handlerLocation([center['lng'],center['lat']],zoom); @@ -482,8 +483,9 @@ const handlerDealCountry = (countyName:String = "临沂市"):void=>{ axios({ method:"get", // url:`http://175.27.168.120:8080/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Axianjie&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=xzqmc%20like%20%27%25${filterName}%25%27`, - url: `http://120.222.154.7:8090/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Axianjie&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=xzqdm_1%20like%20%27%25${filterName}%25%27`, + url: `http://120.222.154.7:8090/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Axianjie&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=xzqmc_1%20like%20%27%25${filterName}%25%27`, }).then(res=>{ + console.log("res",res); handlerLoadCountyLayer(res.data); }) } @@ -511,7 +513,7 @@ const handlerLoadCountyLayer = (geojson)=>{ } } ) - map.moveLayer("heatLayer","countLayer"); + // map.moveLayer("heatLayer","countLayer"); // map.moveLayer("historyLayerLine","countLayer"); // map.moveLayer("historyLayerFill","countLayer"); }