I'm trying to initialize a simple Leaflet instance with Leaflet.Draw plugin enabled. I followed all the tutorials i was able to find anywhere on the internet but the error persists: TypeError: L.Control.Draw is not a constructor
on L.map
line.
My code looks as follows:
import L from 'leaflet19';
import 'leaflet-draw';
const map = L.map('map', {
drawControl: true,
}).setView([51.505, -0.09], 13);
L.tileLayer("/{z}/{x}/{y}.png", {
maxZoom: 19,
attribution:
'© <a href=";>OpenStreetMap</a>',
}).addTo(map);
I'm on leaflet 1.9.4
("leaflet19": "npm:[email protected]"
) and leaflet-draw 1.0.4