I have been using leaflet to show map in my website, which is in dark mode, but until recently, I found dark mode in leaflet map stopped working at all,
This is my code,
this.map = L.map('dv-map', {
minZoom: this.props.minZoom,
maxZoom: this.props.maxZoom
}).setView(this.props.center, this.props.initLevel);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=' + this.props.mapBoxToken, {
maxZoom: this.props.maxZoom,
id: 'mapbox.dark'
})
.addTo(this.map);
I tested other id, such as mapbox.streets, mapbox.satellite etc., still fine, only dark is not working at all.
Can anybody tell me how to prvoide dark mode for the leaflet map?
Thanks