domoritz / leaflet-locatecontrol

A leaflet control to geolocate the user.
https://domoritz.github.io/leaflet-locatecontrol/demo/
MIT License
801 stars 261 forks source link

Warning: "listener not found" for leaflet 1.8.0 #310

Open ThomasK0lasa opened 2 years ago

ThomasK0lasa commented 2 years ago

Since leaflet 1.8.0 fixes the bug with Safari tap event (yay!) it also introduces new warning for leaflet-locatecontrol when removing map.

Here's codesandbox with testing env. https://codesandbox.io/s/leaflet-timeline-control-forked-8df1z1?file=/src/index.js Use "Remove map" and "Add map" to generate the warning.

I am not sure what causes this, but after brief analysis it concerns only the zoomend event: this._map.off('zoomend', this._onZoomEnd, this);

KristjanESPERANTO commented 1 year ago

With Leaflet 1.8.0 I can also see this, but with version 1.9.2 it no longer occurs :slightly_smiling_face: