Currently, I am working on the front-end development of a project using Angular 10.
As part of the project, I am utilizing Leaflet to showcase maps. However, there arose a necessity to install the dependency (leaflet.utm). The challenge I faced was distinguishing between the libraries L
which belonged to both leaflet and leatlet.utm.
Module Installation:
npm i <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cfa3aaaea9a3aabbe1babba28fffe1ffe1fb">[email protected]</a>
Import:
...
import * as L from 'leaflet';
...
The Code Snippet I am Trying to Implement:
var item = L.utm({x: 467486.3, y: 4101149.3, zone: 30, band: 'S'});
Error Prompt:
Property 'utm' does not exist on type 'typeof import("../node_modules/@types/leaflet/index")'.ts(2339)