merge
parent
5d30b2aa32
commit
ba572e4a47
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue