mapbox.js
mapbox.js copied to clipboard
maxNativeZoom ignored if maxzoom set in tileJson
The maxNativeZoom option for overzooming is ignored if a maxzoom is set on a MBtile source. Code below is adapted from the example: https://www.mapbox.com/mapbox.js/example/v1.0.0/overzoom/
// The native maximum zoom level for this tile layer is 10
var map = L.mapbox.map('map', 'logos-barry.dev_testRasterSource', {
tileLayer: {
maxNativeZoom: 10 // The map will use zoom level 10 tiles for all zoom levels past 10
}
}).setView([37.6, 35.9], 9);
/cc @jfirebaugh
@geografa Possibly related to a similar leaflet bug which is fixed in latest master but not 0.7.3. Could either overwrite the private _getTileSize function in tile_layer.js or wait for the next release. Relevant commit