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

Not compatible to the new leaflet 1.1.0 (Solved!!!) #56

Closed
banmtG opened this issue Jul 16, 2017 · 5 comments
Closed

Not compatible to the new leaflet 1.1.0 (Solved!!!) #56

banmtG opened this issue Jul 16, 2017 · 5 comments

Comments

@banmtG
Copy link

banmtG commented Jul 16, 2017

Dear developers,

Could you please update this so that it could be used with the new leaflet.js (1.1.0). It would be soooo great!!!.

Error from console: TypeError: L.Path.prototype._createElement is not a function[Learn More] when I used it with leaflet 1.1.0.

Thanks.

@RhinoDevel
Copy link

Did you use the leaflet0.8-dev branch? See README.md.

@banmtG
Copy link
Author

banmtG commented Jul 19, 2017

Dear RhinoDevel,

Thank you very much for helping me.

I am not so sure how to use both Leaflet 1.1.0 and leaflet0.8-dev branch in one L.map instance. My current web uses leaflet 1.1.0 and its layers and functions (For example: L.tooltip) that were not available in previous leaflet versions.

Maybe you can give me some hints?

All the best,

@RhinoDevel
Copy link

RhinoDevel commented Jul 19, 2017

Take a look at the source of the demo. Replace <script> and <link> entries in <head> with Leaflet 1.1.0 and Leaflet.TextPath's leaflet0.8-dev. Although it might not work - I haven't tested leaflet0.8-dev with the most recent Leaflet 1.1.0.

@banmtG
Copy link
Author

banmtG commented Jul 19, 2017

Thanks so muchhhhhh RhinoDevel.

Finally, with your patience and help, I am able to make it work. You saved my life!!!!

For those who are facing the same issue, please follow the steps below:

  1. Download the source code here (leaflet0.8-dev) https://github.com/makinacorpus/Leaflet.TextPath/tree/leaflet0.8-dev.

  2. Copy the leaflet.textpath.js (this is 0.8 dev) at the root folder of the downloaded package to your project.

  3. Include the 0.8 version in your code. In my case, they are:
    <script src="https://unpkg.com/leaflet@1.1.0/dist/leaflet.js"></script> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.1.0/dist/leaflet.css" /> <script src="js/leaflet.textpath0.8.js"></script>

So you can use the textpath with leaflet 1.1.0

All credits go to RhinoDevel for his kind instruction.

Good luck to you all!

@banmtG banmtG changed the title Not compatible to the new leaflet 1.1.0 Not compatible to the new leaflet 1.1.0 (Solved!!!) Jul 19, 2017
@RhinoDevel
Copy link

@banmtG Please close this issue.

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

2 participants