Closed brigghius closed 1 year ago
Hi @brigghius,
ref: https://github.com/Raruto/leaflet-elevation/issues/182, probably all these console errors are related to the fact that dynamic imports are not properly handled by your single page application (Angular, React, Vue, ...).
You can try to statically include in your project also all dependencies of this library (togeojson
, src/handlers
, ...), they should all be listed here:
otherwise, you can also try override those parameters to URLs of your choice (see: https://github.com/Raruto/leaflet-elevation/pull/192#issuecomment-1092622748 to get an idea of how you could proceed).
Otherwise, as usual, pull requests are welcome if you think you have an idea to improve this.
BTW, I would bet there is even a way recommended by your framework to fix this..
Have a nice day, Raruto
Thanks for the reply. Using elevation version 1.9.6 everything worked fine and I was able to get everything working without problems.
Your environment
I followed the example guide that I find on git, but when loading the component I don't see the complete tracking map and the console returns me an error.
this error disappears if I delete these two lines of code:
I report the code of the .ts file
if in the code instead of putting "(L.control as any).elevation(...) " I use "L.control.elevation(...)", I get an error:
If I run the code I get this:
what am I doing wrong? how can i fix it? Thanks!