Hi,
I need to know, when the user clicked on "close" button on the popup. How should I do that? I know about 'popupclose' event, but it it triggers every time another marker has been clicked and the new popup appears.
I'm trying to write some application when open/close markers corresponds to the current active item. So there are 2 ways to activate item (select it in the list or click the marker) - the marker popup appears and item is "selected" in the list, and it has also 2 ways to deactivate item (click "close" button on the marker popup or click the active element in the list). The problem is, that "popupclose" event triggers every time i select another marker, so i decided to handle "close button" clicks, but i can't do it because of stopPropognation() method, which leaflet use.
How can i differentiate situations when popup were closed by clicking "close popup" button, and when the popup were closed by opening another marker popup? ( "popupclose" event appears in both cases )
Thanks in advance and sorry for my horrible english :(