首页添加县区镇名称标注

main
zhufu 6 months ago
parent b2b09e4154
commit 1ea5a78768

@ -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) {

Loading…
Cancel
Save