OSM's usage policy states (https://operations.osmfoundation.org/policies/tiles/):
"Recommended: Do not hardcode any URL to tile.openstreetmap.org as doing so will limit your ability to react if the service is disrupted or blocked. In particular, switching should be possible without requiring a software update."
I am wondering 1) what is referred to in this passage and 2) how to avoid it.
I am guessing something like the following would be considered "hardcoding a URL to tile.openstreetmap.org".
var map = L.map('mapid', {
center: [39.3, -76.60],
zoom: 11,
minZoom: 3,
maxZoom: 15,
layers: [
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution:
'© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
})
]
});
If so, what's the proper alternative in this case?