In response to the answer of Klokan Technologies in this thread: OSM offline tiles -- mbtiles in openlayers. I managed to unpack a random small mbtiles vector tile map from osm2vectortiles.org and load it locally in a browser using npm http-server, based on this OpenLayers example. However I still have a question:

In the previous answer it is mentioned that the vector tiles down to zoom level 14 contains all street data with details of zoom level 20. However, when I zoom in to level 15+ I get (of course) HTTP 404 file not found errors. I can limit the zoom by setting tileGrid: ol.tilegrid.createXYZ({maxZoom: 14}) but then the map gets blurry at zoom level 15+. How can I utilize the data in zoom level 14 for higher zoom levels?

  • Two questions don't fit in a one question box. Suggest splitting into two questions.
    – BradHards
    Dec 30, 2016 at 5:32

1 Answer 1


It was report to Openlayers issues and closed.

Ensure that you are using Openlayers v4.2+. I was using v3.18 and faced similar issue, once upgraded to v4.3.1, resolved my issue. Follow the steps at here and don't increase the 'maxZoom' value from 14 in this code

var tilegrid = ol.tilegrid.createXYZ({tileSize: 512, maxZoom: 14});

Openlayers will manage with tiles of Zoom level 14 to be used at higher zoom levels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.