|
|
|
|
@ -311,6 +311,31 @@
|
|
|
|
|
minzoom: 10,
|
|
|
|
|
maxzoom: 24,
|
|
|
|
|
})
|
|
|
|
|
map.addSource("zhenjiepoint", {
|
|
|
|
|
"type": "vector",
|
|
|
|
|
"scheme": "tms",
|
|
|
|
|
tiles: [
|
|
|
|
|
"http://175.27.168.120:8080/geoserver/gwc/service/tms/1.0.0/linyishi%3Azhenjiepoint@EPSG%3A900913@pbf/{z}/{x}/{y}.pbf",
|
|
|
|
|
],
|
|
|
|
|
tileSize: 512,
|
|
|
|
|
})
|
|
|
|
|
map.addLayer({
|
|
|
|
|
id: "zhenjiepoint",
|
|
|
|
|
type: "symbol",
|
|
|
|
|
source: "zhenjiepoint",
|
|
|
|
|
'source-layer': 'zhenjiepoint',
|
|
|
|
|
layout: {
|
|
|
|
|
visibility: "visible",
|
|
|
|
|
"text-field": "{xzqmc}",
|
|
|
|
|
},
|
|
|
|
|
paint: {
|
|
|
|
|
'text-color': '#041B36',
|
|
|
|
|
'text-halo-color': '#fff',
|
|
|
|
|
'text-halo-width': 2,
|
|
|
|
|
},
|
|
|
|
|
minzoom: 10,
|
|
|
|
|
maxzoom: 24,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
// 获取县区边界数据
|
|
|
|
|
const handlerDealCountry = (countyName: String = '临沂市'): void => {
|
|
|
|
|
@ -335,6 +360,32 @@
|
|
|
|
|
"line-width": 4,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
map.addSource("xianjiepoint", {
|
|
|
|
|
"type": "vector",
|
|
|
|
|
"scheme": "tms",
|
|
|
|
|
tiles: [
|
|
|
|
|
"http://175.27.168.120:8080/geoserver/gwc/service/tms/1.0.0/linyishi%3Alinyishixianjie_point@EPSG%3A900913@pbf/{z}/{x}/{y}.pbf",
|
|
|
|
|
],
|
|
|
|
|
tileSize: 512,
|
|
|
|
|
})
|
|
|
|
|
map.addLayer({
|
|
|
|
|
id: "xianjiepoint",
|
|
|
|
|
type: "symbol",
|
|
|
|
|
source: "xianjiepoint",
|
|
|
|
|
'source-layer': 'linyishixianjie_point',
|
|
|
|
|
layout: {
|
|
|
|
|
visibility: "visible",
|
|
|
|
|
"text-field": "{xzqmc}",
|
|
|
|
|
"text-size": 18
|
|
|
|
|
},
|
|
|
|
|
paint: {
|
|
|
|
|
'text-color': '#041B36',
|
|
|
|
|
'text-halo-color': '#fff',
|
|
|
|
|
'text-halo-width': 2,
|
|
|
|
|
},
|
|
|
|
|
minzoom: 8,
|
|
|
|
|
maxzoom: 10,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
// 地图定位
|
|
|
|
|
function handlerLocation(lngLat, zoom) {
|
|
|
|
|
|