Ither Posted December 24, 2019 Report Share Posted December 24, 2019 (edited) Hi. I grabbed Nabeel files for moving to leaflet and all is well except 1 thing--whenever you click on an aircraft that's on live map you get the bubble popup that shows flight info, nav markers for route, etc. However, when you click X the only thing that disappears is navbubble. How do you get all the markers clear? --- SOLUTION --- If you want the points to disappear when clicking "X" in the pop up find the following in acarsmap.js .bindPopup(tmpl("navpoint_bubble", { nav: nav })) .bindPopup(detailed_bubble) and replace with .bindPopup(tmpl("navpoint_bubble", { nav: nav })).on("popupopen", () => { $(".leaflet-popup-close-button").on("click", e => { clearSelMarkers(); }) }) .bindPopup(detailed_bubble).on("popupopen", () => { $(".leaflet-popup-close-button").on("click", e => { clearSelMarkers(); }) }) Edited December 24, 2019 by Ither Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted December 24, 2019 Administrators Report Share Posted December 24, 2019 The markers on the map for VOR, fix, etc, - those along the planned route line, should disappear in 10-30 seconds without any input from the user. I believe the default is 10,000 ms (10 seconds). Quote Link to comment Share on other sites More sharing options...
Ither Posted December 24, 2019 Author Report Share Posted December 24, 2019 (edited) 9 hours ago, ProAvia said: The markers on the map for VOR, fix, etc, - those along the planned route line, should disappear in 10-30 seconds without any input from the user. I believe the default is 10,000 ms (10 seconds). I thought that 10,000 was refresh rate of the map. Is that the only way to clear markers? Update it doesn't clear markers for me. I click on airplane; I get the markers for dep/arr/nav fixes and bubble over aircraft showing details. In 10 seconds the bubble disappears but the markers stay and I'm stuck zoomed in on that flight. I want the opposite to happen; I want all markers to go away at most. So that when I zoom out I have clean map of just airplane icons until I click another flight. I've seen other maps do it with Google where you click X on navbubble and it clears everything. I'm not real good with leaflet so I haven't found magic button that does it. I see where markers get pushed tho. Edited December 24, 2019 by Ither Quote Link to comment Share on other sites More sharing options...
Ither Posted December 24, 2019 Author Report Share Posted December 24, 2019 See first post for solution on what I wanted. Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted December 24, 2019 Administrators Report Share Posted December 24, 2019 Thanks for sharing the solution. Hopefully this will help out other members in the future. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.