Leaflet.PolylineDecorator icon indicating copy to clipboard operation
Leaflet.PolylineDecorator copied to clipboard

Add a Symbol.Text option

Open njbuch opened this issue 7 years ago • 3 comments

I have used the PolylineDecorator with please for a while now, but has a need to try adding a text symbol (an icon) along the line. I have looked at the TextPath library that does not work with the new leaflet anymore. Has anyone gotten this to work, or has the ninja-skills to add it to the L.Symbol class?

Thanks for any assistance or hints!

njbuch avatar Oct 01 '17 18:10 njbuch

Downloading the icon as svg and placing it like the aeroplane in the example worked like a charm. Flexible icons is a little more tricky, but doable. Still interested though, in placing text along the line.

njbuch avatar Oct 02 '17 19:10 njbuch

Hi! Glad it worked with an SVG icon. Maybe I should write it more explicitely that it works out ot the box.

On the other hand, placing any text string along the line is a different matter that doesn't match the plugin inner workings. I was glad to advise people to use Leaflet.TextPath for that, but I hadn't noticed it had gone so unmaintained. Actually their leaflet0.8-dev branch seems to work with the latest Leaflet version, but this is old and hard to find. I'll try to find time to propose a patch to update the project.

bbecquet avatar Oct 15 '17 15:10 bbecquet

njbuch, please find some instruction to use textpath with leaflet 1.* here: https://github.com/makinacorpus/Leaflet.TextPath/issues/56

banmtG avatar Nov 15 '17 03:11 banmtG