Well that Java API for Google Maps doesn’t exists which is a shame. Especially considering the fact that there is an API for Flash!

With the help of this post “How Google Maps Works“, I created this small useless (no navigation/zooming yet) proof of concept which caches the map-tiles on disk (in a separate thread) to avoid getting banned from Google Maps.
Nice to see that Google uses some security mechanism to avoid people from abusing their service; they add a variable-length substring “Galileo” to each url of a tile where the substring is calculated as follows: “Galileo”.substr(0,(tile.x*3+tile.y)%8). That isn’t difficult to find (it’s straight there to read in their JavaScript code), but one day they might change this code….

maps