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