This commit is contained in:
a-ill
2023-07-14 22:27:11 +03:00
parent 54042ca875
commit 52ab70d0de
46 changed files with 244 additions and 93 deletions

View File

@@ -31,10 +31,12 @@ for (let c of communes) {
}
}
export let communesMarkersLayer = L.layerGroup()
export function addMarkersCommunes(map,content) {
for (let g of communes) {
let coordinates
let text = ""
let text = "<b>Commune</b><br>"
for (let field in g) {
let fieldText = content[field] + ": "
if (field=="contact") {
@@ -62,6 +64,7 @@ export function addMarkersCommunes(map,content) {
shadowSize: [41, 41]
});
let marker = L.marker(coordinates, {icon: markerIcon})
marker.addTo(map).bindPopup(text)
marker.addTo(communesMarkersLayer).bindPopup(text)
}
communesMarkersLayer.addTo(map)
}