function createMap(divName) {
// Create a map
- var map = L.map(divName).fitBounds(<%= @bbox.to_json %>);
+ var map = L.map(divName, {
+ worldCopyJump: true
+ }).fitBounds(<%= @bbox.to_json %>);
// Create a layer switcher
var layers = L.control.layers(null, null, {collapsed:false}).addTo(map);
// Add OpenStreetMap layer
- layers.addBaseLayer(L.tileLayer("//tile-openstreetmap-org.global.ssl.fastly.net/{z}/{x}/{y}.png", {
+ layers.addBaseLayer(L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: "© <a target=\"_parent\" href=\"https://www.openstreetmap.org\">OpenStreetMap</a> and contributors, under an <a target=\"_parent\" href=\"https://www.openstreetmap.org/copyright\">open license</a>",
maxZoom: 19
}), "OpenStreetMap");