makinacorpus / Leaflet.TextPath

Show text along Polyline with Leaflet
https://makinacorpus.github.io/Leaflet.TextPath/
MIT License
285 stars 112 forks source link

Dynamic centering on visible portion of the path #46

Open a1an77 opened 8 years ago

a1an77 commented 8 years ago

It would be great to have an option to choose between static (current behaviour) and dynamic centring of the label on partially visible paths. By dynamic I mean that the label position should be recomputed on moveend so that it stands in the centre of the visible portion of it. This way the label would be visible to the user until there is no space left to place it instead of standing outside of the map only because the centre of the whole path it labels is out of view.