I have a angular application and need to use the custom leaflet package:
I am trying to use this in my application. I install it like so:
npm i @raruto/leaflet-elevation
and then at the top of my page imported it like so:
import * as L from ‘@raruto/leaflet-elevation’;
this.map = L.map("map").setView([0.0, 0.0], 1);
let googleRoadMap = L.gridLayer.googleMutant({
type: 'roadmap'
});
googleRoadMap.addTo(this.map);
(L.control as any).elevation(elevation_config).addTo(this.map);
However I get the following error when I run the app :
Msg: ERROR Error: Uncaught (in promise): Error: Cannot find module 'localhost/../src/handlers/distance.js' Error: Cannot find module 'localhost/../src/handlers/distance.js'
I am new to JS and Angular etc I have come from PHP
I am wondering how to solve this?
Thanks