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.

CommentFileSizeAuthor
#1 support_popup_type.patch890 bytesrballou
support_popup_type.patch890 bytesrballou

Comments

rballou’s picture

StatusFileSize
new890 bytes

Here is an updated version of this patch

rballou’s picture

Status: Active » Needs review

Changing to needs review. Looks like the patch in #1 still applies cleanly

gcb’s picture

Issue summary: View changes
Status: Needs review » Fixed

Excellent, thanks @rballou. Rolled into Dev. Would be nice to have some UI for populating this content...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.