How can I change the default loading tile color in LeafletJS?

thisissami picture thisissami · Dec 13, 2012 · Viewed 11.7k times · Source

By default, when leafletJS is loading a map, the background tiles are all grey. I'd like to change that color to be black (or any other arbitrary color). How can I go about doing this?

Answer

dencey picture dencey · Dec 13, 2012

It's controlled by the below css rule in the file 'leaflet.css':

.leaflet-container {
    background: #ddd;
}

so you just need to change this rule.