mapbox.js icon indicating copy to clipboard operation
mapbox.js copied to clipboard

maxNativeZoom ignored if maxzoom set in tileJson

Open geografa opened this issue 10 years ago • 1 comments

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 avatar Mar 19 '15 18:03 geografa

@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

drewbo avatar May 15 '15 18:05 drewbo