Closed crh3675 closed 8 months ago
I implemented this plugin but when a stroke is around the circle, the text is horizontally offset.
The fix is to update the getBBox call to include the stroke:
https://github.com/w8r/leaflet-labeled-circle/blob/master/src/circle.js#L168
const bbox = textElement.getBBox({stroke: true, markers: true);
Would be nice to expose that as an option to the base implementation
return L.labeledCircleMarker(latlng, feature, { markerOptions: { fillOpacity: 1, shiftY: 5, bboxOptions: { stroke: true, markers: true }, textStyle: { fontSize: 10, color: color.color },
I implemented this plugin but when a stroke is around the circle, the text is horizontally offset.
The fix is to update the getBBox call to include the stroke:
https://github.com/w8r/leaflet-labeled-circle/blob/master/src/circle.js#L168
Would be nice to expose that as an option to the base implementation