Skip to main content
1 of 2
yesman
  • 488
  • 2
  • 7
  • 15

Leaflet - what to do when your maptiles don't load?

I'm using Leaflet, and using OSM's tile.openstreetmap.org tile server. However, sometimes my application does not load the maps tiles. It seems OSM's servers are having some problems sporadically, which is out of my scope of fixing. So, my question:

Is it possible to wait an X amount of time for the tile server to load the requested tiles, before removing the tileLayer and replacing it with a tileLayer that uses another URL for its tiles?

yesman
  • 488
  • 2
  • 7
  • 15