How to determine which triggered the popup close? Is it mouse click or auto close or zoom event, etc.
(The quest is simple so no need to provide codes and stuff.)
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityHow to determine which triggered the popup close? Is it mouse click or auto close or zoom event, etc.
(The quest is simple so no need to provide codes and stuff.)
I don't think this is possible with what leaflet supports out of the box. You can only listen on the popupclose
event. Unfortunately the data from the event doesn't give you a hint why it was closed. A hack could be to listen on the other events at the same time (like zooming, clicking etc.) and try to determine why the popup was closed.