diff --git a/src/js/leaflet.storage.js b/src/js/leaflet.storage.js index 04bafcc7..f14dfab3 100644 --- a/src/js/leaflet.storage.js +++ b/src/js/leaflet.storage.js @@ -408,6 +408,11 @@ L.Storage.Map.include({ }, createTileLayer: function (tilelayer) { + // out-of-box support for Mapbox Studio layers + if (tilelayer.url_template.indexOf('api.mapbox.com/styles') != -1) { + tilelayer.tileSize = 512; + tilelayer.zoomOffset = -1; + } return new L.TileLayer(tilelayer.url_template, tilelayer); },