I use npm package management and my package.json looks like this:
"leaflet": "1.0.3",
"leaflet.elevation": "0.0.3",
...
"react-leaflet": "1.1.4",
I thought to use leaflet.elevation in traditional (non-react) way, however L.control.elevation
which is meant to be used as constructor is undefined
.
I am able to use Leaflet via the global L
variable and also via import as this this one:
import MyOwnLeaflet from 'leaflet';
MyOwnLeaflet.Marker
however when I try to use leaflet.elevation
in the same manner:
import MyOwnLeafletElevation from 'leaflet.elevation';
I end up with:
Module not found: Error: Can't resolve 'leaflet.elevation'
via Peter
No comments:
Post a Comment