IITC-CE / Leaflet.Canvas-Markers

Leaflet plugin for displaying icons on canvas instead of DOM
MIT License
2 stars 4 forks source link

Uncaught TypeError: Cannot read property '_leaflet_id' of undefined #8

Closed johnd0e closed 5 years ago

johnd0e commented 5 years ago
        removeMarker: function (marker, redraw) {
            var fn = function (a, b) {
                return a.data._leaflet_id === b.data._leaflet_id;
            };
VM29:1877 Uncaught TypeError: Cannot read property '_leaflet_id' of undefined
    at fn (<anonymous>:1877:31)
    at <anonymous>:1356:3229
    at e.remove (<anonymous>:1356:3257)
    at NewClass._removeGeneric (<anonymous>:1903:37)
    at NewClass.removeMarker (<anonymous>:1894:18)
    at NewClass.removeLayer (<anonymous>:1873:18)
    at <anonymous>:20332:23
    at Array.forEach (<anonymous>)
    at Object.removePortal (<anonymous>:20330:27)
    at window.Render.deletePortalEntity (<anonymous>:19154:22)
johnd0e commented 5 years ago

This is real problem. layer has marker but removeMarker just fails.

Fixed by eda858e81a3df5c62cda7de164b4dc99e243edf5 (I hope)