Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Symbol.Text option #67

Open
njbuch opened this issue Oct 1, 2017 · 3 comments
Open

Add a Symbol.Text option #67

njbuch opened this issue Oct 1, 2017 · 3 comments

Comments

@njbuch
Copy link

njbuch commented Oct 1, 2017

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
Copy link
Author

njbuch commented Oct 2, 2017

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.

@bbecquet
Copy link
Owner

bbecquet commented Oct 15, 2017

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.

@banmtG
Copy link

banmtG commented Nov 15, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants