Thursday, April 25, 2013

Offline Maps With CalTopo To Go

As hinted at with the introduction of browser maps, you can now take CalTopo on the road, offline, without an internet connection.  Download maps ahead of time, edit them in the field, and then re-upload them when you hit civilization - or simply take some layered map goodness with you for offline viewing.

Step One: Save Maps to Your Browser.  See this post for details.

Step Two: Cache Map Tiles.  Go to  You'll get a rectangle select just like on the Print and KMZ Export pages.  Choose the area and zoom level you need, and check the layers you want to bring with you.

layer and zoom selection
Note that while there is a 1600 tile limit, the HTML5 Application Cache is a fragile beast.  Your browser may run out of space and throw an error before reaching 1600.  When you're ready, click the "Take This To Go" button:

You'll see "Processing . . ." for a while as the server builds up a cache manifest, and then a browser specific progress message.  When all the files are cached, you'll get an alert and be redirected to the offline page:

Step Three: Go Offline.  When you go offline, or when you just want to take it for a test drive, point your browser at  You'll get a simplified version of the CalTopo UI, using the OpenLayers map engine instead of Google Maps.

The simplifed CT2GO UI
The layer dropdown is limited to your cached layers

Some random thoughts and caveats:

  • This will not work with IE (9 and below) as it doesn't support HTML5 Application Caches.
  • This feature is both more fragile and harder to test than a standard online webapp.  Please send me bug reports if something doesn't work right.
  • Tile caching is currently limited to one rectangle at a time.
  • While it worked fine with an iPad, phone support is tricky, mostly because of the screen real estate required for the caching page.  I'll work on allowing you to draw a rectangle with your desktop and then cache it on your phone.

1 comment: