How can I import the leaflet-elevation. js file offline in a Vue project
Hi!I want to use the L.control. elevation function in the Vue project by introducing the eaflet-elevation. js file. Here is my citation method
But I found that the following errors may occur.
Does it still need to import files like distance.js ?
Hi @InstantWindy,
I found that the following errors may occur.
Be aware, It looks like you are trying to develop without http server (ie. I don't know how much this mode is supported).
Does it still need to import files like distance.js ?
Yes, otherwise you just need a L.Control.Elevation.Speed (and the others/used handlers) within the global scope:
https://github.com/Raruto/leaflet-elevation/blob/bd9316bd1b7e7784b3bf3d812960eaa808ad94d6/src/control.js#L750-L764
Here's a fairly complete example:
https://github.com/Raruto/leaflet-elevation/blob/bd9316bd1b7e7784b3bf3d812960eaa808ad94d6/examples/leaflet-elevation_extended-ui.html#L42-L221
https://github.com/Raruto/leaflet-elevation/blob/bd9316bd1b7e7784b3bf3d812960eaa808ad94d6/examples/leaflet-elevation_extended-ui.html#L253-L271
👋 Raruto