Hello,
First post here...
I would like to display a marker with its popup open, when it matches a given querystring
e.g :
when loading page : myurl?id=75
Then I want the given marker matching this ID to be in the state "OpenPopup()'.
First, it seems there's no way to assign an id to a marker. I could pass it as 'title', but it's ugly, and I can't search markers by title (as far as I know). And also I use tooltip instead.
I also tried to rely on lat,lon but they are somewhat rounded up, when using the "hash" in the URL (#
zoom-level/lat/lon), so not reliable enough (
6.2464496 becomes 6.24645)
Second I load two JSON files (files are not mine, otherwise I would have done differently).
File "A" holds for the lat, lon and ID.
File "B" holds the data to be displayed in the popup content, and the ID.
Working sample is here :
https://parapente-mexico.com/balise-ffvlunminified JS code is here :
https://parapente-mexico.com/js/condorito-map.js In a nutshell, when I display :
https://parapente-mexico.com/balise-ffvl/?ttl=Montmin&id=75#11/45.8140/6.2464I would like to have "Montmin décollage" marker to pop up.
I hope it's clear enough. Any ideas ?
I saw this "workaround', but it would not be applicable in my case :
https://stackoverflow.com/questions/42081012/openpopup-in-leaflet-map-using-custom-link-clickThank you.