Leaflet.Bookmarks icon indicating copy to clipboard operation
Leaflet.Bookmarks copied to clipboard

Option for more information

Open tdaubs opened this issue 10 years ago • 2 comments

Really nice work on this add-on for Leaflet. Small feature request. It would be great to see an additional option for a note that would populate the infowindow beyond just the title.

tdaubs avatar Dec 10 '14 17:12 tdaubs

@tdaubs, as mentioned in the docs, you can define your own data structure for a bookmark, the only required field being latlng. You can change the bookmark form, data extraction from it (options.formPopup.template and options.formPopup.getBookmarkData), as well as bookmark popup.

{
    popupTemplate: '<div><h3>{{ name }}</h3><p>{{ latlng }}</p>'
}

Storage is fully under your control as well. If it sounds too complex or foggy, I can try and add an example of customisation.

w8r avatar Dec 10 '14 22:12 w8r

Yes, an example would be great! Maybe a description field or note field or similar.

tdaubs avatar Dec 10 '14 22:12 tdaubs