Our next rev of the mapping software included tiling and progressive tile loading. We started with a commercial backend for creating the tiles (ESRI ArcIMS), and eventually switched to an open source solution (UWM's MapServer). Last I heard they had an entirely open source stack (MapServer, OpenLayers, gdal, etc).
Anyways, when I realized that Google had cached each and every one of these tiles - at every zoom level - I was simply confounded. It was the first time I actually contemplated the scale of a company like Google.
The problem back then was storage. Even for the US-only trail maps we were doing, there was no way we were going to store all those tiles at the $$$/GB that hard-drive space went for at the time. The plan was to cache only the most popular areas, and rebuild outlying tiles as necessary.
How did you come up with that number? The sum loop that follows reports 524287 tiles total.
#include <stdio.h> #include <math.h> int main(void) { int i; double tot = 0; for(i = 0; i <= 18; ++i) tot += exp2(i); printf("tot %f\n", tot); return 0; }