forked from MapComplete/MapComplete
Layerserver: improve docs, add stub of script that generates configuration file
This commit is contained in:
parent
c98891d4bd
commit
fb088059a5
3 changed files with 194 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue