I've encountered a use-case where I need to add points and stand-alone popups to a Leaflet map. This is possible with the Leaflet API (documentation) and I believe this would be a useful feature in this module. Below is a patch which adds this to the current 7.x-1.x branch.
This works by specifying a feature type of "popup" and "content" for the content of the popup. I decided on the "content" property solely because the code detects if the feature has a popup and tries to bindPopup, which doesn't exist for L.Popup(), but this could definitely be changed if there is a better way to accomplish it in the future.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | support_popup_type.patch | 890 bytes | rballou |
| support_popup_type.patch | 890 bytes | rballou |
Comments
Comment #1
rballou commentedHere is an updated version of this patch
Comment #2
rballou commentedChanging to needs review. Looks like the patch in #1 still applies cleanly
Comment #3
gcbExcellent, thanks @rballou. Rolled into Dev. Would be nice to have some UI for populating this content...