Layerserver: improve docs, add stub of script that generates configuration file

This commit is contained in:
Pieter Vander Vennet 2024-01-17 02:30:13 +01:00
parent c98891d4bd
commit fb088059a5
3 changed files with 194 additions and 5 deletions

View file

@ -36,6 +36,26 @@
},
)
map.addSource("toilet", {
"type": "vector",
"tiles": ["http://127.0.0.2:7800/public.toilet/{z}/{x}/{y}.pbf"] // http://127.0.0.2:7800/public.drinking_water.json",
})
map.addLayer(
{
"id": "toilet_layer",
"type": "circle",
"source": "toilet",
"source-layer": "public.toilet",
"paint": {
"circle-radius": 5,
"circle-color": "#0000ff",
"circle-stroke-width": 2,
"circle-stroke-color": "#000000",
},
},
)
map.on('click', 'drinking_water_layer', (e) => {
// Copy coordinates array.
console.log(e)