You just need to add your title in the "TITLE" section ...
var legend = L.control({position: 'topleft'}); legend.onAdd = function (map) { var div = L.DomUtil.create('div', 'info legend'), grades = [50, 100, 150, 200, 250, 300], labels = ['<strong> THE TITLE </strong>'], from, to; for (var i = 0; i < grades.length; i++) { from = grades [i]; to = grades[i+1]-1; labels.push( '<i style="background:' + getColor(from + 1) + '"></i> ' + from + (to ? '–' + to : '+')); } div.innerHTML = labels.join('<br>'); return div; };
source share