// Add legend to the map
var legend = L.control({position: 'bottomright'});
legend.onAdd = function(map) {
var div = L.DomUtil.create('div', 'legend');
var labels = ['<strong>Species</strong>'];
for (var species in speciesColors) {
labels.push(
'<i style="background:' + speciesColors[species] + '"></i> ' +
species
);
}
div.innerHTML = labels.join('<br>');
return div;
};
legend.addTo(map);
But I need to add the background color and some other style features I think. Examples I got from tutorials are all referring to a <style> section. Something like this:
This is a sub- issue for solving #209.
I want to add a legend with colors.
I added it with:
But I need to add the background color and some other style features I think. Examples I got from tutorials are all referring to a
<style>
section. Something like this:@peterdesmet: Is this