Monday, 1 October 2018

Load vector tiles (pbf) directly from mbtiles database using OpenLayers 3



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?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...