Is there any way to get OpenLayers 3 to scale past the native zoom as is possible in Leaflet?
For reference, in Leaflet simply set maxZoom higher than maxNativeZoom and it stretches or perhaps scales the tile for a closer view.
In this example tiles go to 16. I'd like to scale 16 up to 18 for a closer view:
map = new ol.Map({
target: 'map_div',
renderer: 'canvas',
view: new ol.View({
center: ol.proj.transform([X_LO,X_LA], 'EPSG:4326', 'EPSG:3857'),
zoom: 16,
minZoom: 4,
maxZoom: 16
})
});
L1=new ol.layer.Tile({
source: new ol.source.XYZ({
url:'http://blahblah.com/map_tiles.php?Z={z}&X={x}&Y={y}'
}),
maxResolution:152.87,// 9
minResolution:1.94// 16
});
map.addLayer(L1);
Solution from @erilem
map = new ol.Map({
target: 'map_div',
renderer: 'canvas',
view: new ol.View({
center: ol.proj.transform([X_LO,X_LA], 'EPSG:4326', 'EPSG:3857'),
zoom: 16,
minZoom: 4,
maxZoom: 18
})
});
L1=new ol.layer.Tile({
source: new ol.source.XYZ({
url:'http://blahblah.com/map_tiles.php?Z={z}&X={x}&Y={y}',
maxZoom: 16
})
});
map.addLayer(L1);