You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the contextmenu mixin with geoJSON features. The features are frequently updated by clearing the geoJSON layer and re-adding new features. It sometimes happens that a feature is removed while its context menu is open. When this happens, when the context menu is closed, an exception is thrown in Mixin.ContextMenu.js line 72 because this._map is null. After this, the list of contextmenu items gets out of sync and future contextmenus have spurious items.
+1 on this patch. I am using leaflet-routing-machine with draggable markers, and I find that when I have a contextmenu associated with a marker and long-press the marker on mobile, the menu sometimes gets into a messy state and the callbacks are not fired. It looks like it's caused by the marker being dragged, which fires another event of mine that removes the marker. I tried this patch on a hunch, and it resolved my issue completely.
Thanks for the great library.
I'm using the contextmenu mixin with geoJSON features. The features are frequently updated by clearing the geoJSON layer and re-adding new features. It sometimes happens that a feature is removed while its context menu is open. When this happens, when the context menu is closed, an exception is thrown in Mixin.ContextMenu.js line 72 because this._map is null. After this, the list of contextmenu items gets out of sync and future contextmenus have spurious items.
The attached patch solves this issue for me.
handle_deleted_layer.patch.txt
The text was updated successfully, but these errors were encountered: