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

时间秒杀一切 提交于 2019-12-03 23:21:22

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/13851888/how-can-i-change-the-default-loading-tile-color-in-leafletjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!