|
|
@ -24,26 +24,20 @@ export const getLayersForMarkers = ( |
|
|
|
]; |
|
|
|
]; |
|
|
|
}), |
|
|
|
}), |
|
|
|
// circles and labels
|
|
|
|
// circles and labels
|
|
|
|
...markers.flatMap((marker) => { |
|
|
|
...markers.map((marker) => |
|
|
|
const circle = leaflet.circleMarker(marker.coordinates, { |
|
|
|
leaflet |
|
|
|
...markerLayersStyle, |
|
|
|
.circleMarker(marker.coordinates, { |
|
|
|
bubblingMouseEvents: false, |
|
|
|
...markerLayersStyle.circleStyle, |
|
|
|
fill: true, |
|
|
|
bubblingMouseEvents: false, |
|
|
|
fillOpacity: 100, |
|
|
|
fill: true, |
|
|
|
}); |
|
|
|
fillOpacity: 100, |
|
|
|
const tooltip = leaflet |
|
|
|
}) |
|
|
|
.tooltip( |
|
|
|
.on('click', marker.remove) |
|
|
|
{ |
|
|
|
.bindTooltip(marker.shortLabel, { |
|
|
|
permanent: true, |
|
|
|
permanent: true, |
|
|
|
direction: 'center', |
|
|
|
direction: 'center', |
|
|
|
className: 'text', |
|
|
|
className: 'text', |
|
|
|
content: marker.shortLabel, |
|
|
|
content: marker.shortLabel, |
|
|
|
}, |
|
|
|
}), |
|
|
|
circle, |
|
|
|
), |
|
|
|
) |
|
|
|
|
|
|
|
.setLatLng(marker.coordinates); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
circle.on('click', marker.remove); |
|
|
|
|
|
|
|
return [circle, tooltip]; |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
]; |
|
|
|
]; |
|
|
|