Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
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 '12 at 15:02
    
Thank you, that looks very nice... Probably it's easily adapted for othe servers as well –  nus Jan 17 '12 at 21:29
add comment

2 Answers

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.

share|improve this answer
    
Or for that matter, any tile cache service, such as tilecache.org, geowebcache.org.. etc –  Michael Markieta Jan 19 '12 at 5:20
add comment

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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