Cache Google Maps tiles by browsing the location of interest

This is simple C app that I wrote up and tested in about 2 hours that automatically saves the map tiles of Google Maps as you browse a location of interest. The bundled tool, tiler is a handy utility for arranging the matrix of the gathered Google Maps tiles for a certain zoom level.

Originally this was written as a fast and dirty way to get lots of map data for an independent project in the summer of 2009. As the API or URLs may have changed since then, its current working status is not guaranteed. As of May 2010, it still works.

Zoom level 4, centered North Carolina

Sample directory with some saved tiles

The tile images are saved into the app directory under folders corresponding to their zoom level (0 - 20). Controls and interface are minimal: use your mouse wheel to zoom in and out, click and drag to move the map and Esc to quit.

One note: the graphics library that I used to read the PNG files is NOT- threadsafe so you may encounter distorted palettes and crashing if your internet connection is slow or unreliable. If GMBrowser keeps crashing, run the generated fixme.bat file. It will clear the problematic directory (make sure you want to do this before you run it!)

Sample Tile Output

Update 2017

Of course, much more sophisticated tools exist now for extracting map data. Or if you want to go next-level, there’s always the OpenStreetMaps project which seeks to be a fully open-sourced replacement for the proprietary mapping services like Google Maps.