Open Marker Popup programmatically?
See original GitHub issueI cannot find any way to call marker.openPopup() when the LMarker object is being handled by this lib.
Is there any, are there workarounds such as emitting a click event on the marker? How would I get a hold of the L.Marker instance?
PS: I’m sorry for not using StackOverflow to ask this question. I figured that GitHub issues is the first place devs would look for solutions as per convention - furthermore SO is empty and I don’t know if you even would get notified.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Cant open popup programmatically - leaflet - Stack Overflow
Save this question. Show activity on this post. I have a map on which im loading the markers with geoJSON.
Read more >React Leaflet: Opening Popups Programmatically - Max Schmitt
In this post, I'll show you how to reveal a marker with its popup on a Map rendered by React Leaflet. Starting Point:...
Read more >Leaflet marker popup link from outside of map dynamically
I am using Leaflet JavaScript library to show some earthquake informations. You can able to see few red circles on map. When you...
Read more >Show leaflet marker popup from outside of map dynamically
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >Work with markers in Mapbox.js | Help
You can customize the content of each popup with the L.bindPopup method. In this example, an image key is added to each feature's...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can place a ref on the l-popup element ie: myPopup then you can do:
this.$refs.myPopup.mapObject.openPopup()you can also use the click event on the maker for that you can check this code: https://github.com/pulilab/vue-people/blob/master/frontend/components/MapMarker.vueWhat worked for me is calling openPopup on the marker ref, instead of the popup.