I am developing a slippy map web application using openlayers. Right now my tiles come straight away from OSM and google, etc. For the moment I always work on the same area for development purposes and I would like to have those tiles cached on my dev machine so I can work on the web app offline yet still see some map and to reduce network consumption.

What I would like is to set up some sort of proxy which would just cache tiles I watch and if they are not on the local machine download them or show a dummy tile if I am offline.

I thought tilecache was the tool for this, but I get quite confused trying to set it up. It seems more appropriate for mapserver generating tiles from map data. I know firefox does some caching, but I would like some more control and be able to clear that cache to make sure I see the last update of my work.

What is the most straightforward way to achieve this?

  • 3
    wiki.openstreetmap.org/wiki/ProxySimplePHP and use your computer as the host - if it needs more tiles it grabs them from the a.tile.openstreetmap.org, b.tile.openstreetmap.org servers on demand
    – Mapperz
    Jan 17, 2012 at 15:02
  • Thank you, that looks very nice... Probably it's easily adapted for othe servers as well
    – user5514
    Jan 17, 2012 at 21:29

2 Answers 2


With your purpose, i think mapproxy (www.mapproxy.org) is the best choice. MapProxy not only caches tiles, wms source but also serve the cached tiles as TMS, WMS.


One way would be to generate your own tiles on the disk: http://braincrunch.tumblr.com/post/9921938947/maperitive-tutorial-a-hiking-web-map-in-ten-easy-steps (you only need steps 1, 3, 5 and 7).

Your Answer

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