You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.
Hi, I try to add this code to label.js and bringing label to the center position of circleMarker
not tested in Marker. I Think it would be nice to add feature to the plugin that can put the label in the center position (center-top or center-bottom)
// center
if (direction === 'center')
{
distance = this.options.distance || 5;
mark_height = this._source._radius + (labelHeight/2) + distance;
L.DomUtil.addClass(container, 'leaflet-label-center');
L.DomUtil.removeClass(container, 'leaflet-label-left');
L.DomUtil.removeClass(container, 'leaflet-label-right');
pos = pos.add(L.point(-offset.x - (labelWidth /2) + offset.x, offset.y - mark_height));
// position to the right (right or auto & needs to)
} else if (direction === 'right' || direction === 'auto' && labelPoint.x < centerPoint.x) { ... }
The text was updated successfully, but these errors were encountered:
Hi, I try to add this code to label.js and bringing label to the center position of circleMarker
not tested in Marker. I Think it would be nice to add feature to the plugin that can put the label in the center position (center-top or center-bottom)
The text was updated successfully, but these errors were encountered: