Closed AlbertoMCS closed 1 year ago
Hi, Already found the error, it is not Geoman related it is Leaflet related. In previous versions you could do the following:
var lyrBus; // empty layer, a placeholder
if (map.hasLayer(lyrBus)) {
map.removeLayer(lyrBus);
}
From 1.8.0 version onwards you need to provide a proper argument, otherwise you will get the error mentioned:
var lyrBus = L.marker([51.505, -0.09]); // need to be initiated with a Leaflet layer
if (map.hasLayer(lyrBus)) {
map.removeLayer(lyrBus);
}
Hi, I created a button to create rectangles. When clicking the button I get this error:
Util.js:55 Uncaught TypeError: Cannot use 'in' operator to search for '_leaflet_id' in undefined
This just happens with Leaflet 1.8.0 and newer versions (with 1.7.0 works). Here the fiddle: https://jsfiddle.net/7cx2ztuq/1/ Thanks