ui-leaflet icon indicating copy to clipboard operation
ui-leaflet copied to clipboard

Allow titles on map legend

Open pedrorocha-net opened this issue 8 years ago • 0 comments

We can allow users to add extra HTML markup on the legend, at least for a title before the items.

On _getOnAddArrayLegend() function, we can simply add div.innerHTML += '<div class="title">' + legend.title + '</div>'; after var div = L.DomUtil.create('div', legendClass);

Need to sanitize and check if the title is there, but i'm still getting used to Leaflet and ui-leaflet, so i'm not sure if I have enough time to make a patch and PR.

If anyone could help here, would be great.

pedrorocha-net avatar Jan 23 '17 14:01 pedrorocha-net