React-leaflet: Feature request: auto-open popup on marker

Created on 30 Nov 2017  路  1Comment  路  Source: PaulLeCam/react-leaflet

I would like to place a marker on a map, alongside with a Popup containing info about the place that is being marked, just like it is shown on the Leaflet homepage: http://leafletjs.com/

I know that I can place a <Popup> inside a <Marker>. But this has popup will only show up if the user clicks on it. It would be great if the popup could be configured in a way that it shows up immediately.

I found this StackOverflow answer explaining how this can be achieved with a derived Marker class:
https://stackoverflow.com/questions/38730152/popup-always-open-in-the-marker

Yet I think this is such a common use case it would be great if the Marker element would support this directly, by providing a boolean property like showPopup. Or, alternatively, by adding a show property to the Popup element itself.

>All comments

You can extend the Popup component to implement this behavior, but it won't be provided by this library itself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kojoa picture kojoa  路  3Comments

gane5h picture gane5h  路  3Comments

rolfdalhaug picture rolfdalhaug  路  3Comments

robinmetral picture robinmetral  路  4Comments

acpower7 picture acpower7  路  4Comments