Page 1 of 1

Tip for offline caching of openstreetmap tiles

Posted: Fri Jul 24, 2020 10:57 am
by deedee123
I was checking to speed-up loading the projects a bit, and found that when loading, some map tiles are always already loaded, even when no map is clicked yet. that should for many not be much of a problem but i'm working from china where often tiles (only openstreetmaps, others are blocked) are a bit slow to load.

however i found this offline caching script here: https://github.com/andrewpmk/osm-tiles-cache

to my surprise it actually works. files are stored on my own server after first 'call'. next visitor gets the cached tiles. it really speeds up that part.

at the map URL template in pano2vr you need to enter: (absolute path to where you put the script on your server)/tiles.php?z={z}&x={x}&y={y}

moving, zooming, it all works. maybe someone can also use it :)

best,
david