There also seems to be some caching going on. The maps application in my iPod touch could track me accurately when walking around the city – with Wifi turned off. It seems to download the locations of all the Wifi routers in your area as soon as you have a internet connection, when you lose that connection it can still find out where you are (it needs only the MAC addresses).
I ran a test this morning, running the Google Maps application as I traveled to work. Wifi-only geolocation continued to accurately position me to the nearest intersection for about 3 city blocks after I left my home access point (and without connecting to any other access points for network access).
So it's got a cache of nearby access points it can use for positioning even without a network connection.
About 4 blocks away, it mistakenly placed me on a hillside 4 blocks in the opposite direction from my starting point -- but the local topography makes it very possible it caught a momentary signal from a faraway access point still in its cache.
From that point on, it provided no additional updates to my location -- even though I was following a 'directions' route previously called up, stepped through, and zoomed-on. From this I conclude: it precaches Wifi points near where you are when initially using location, but not along planned paths or all map areas viewed.
The Wifi doesn't have to connect to know where you are. I'm pretty sure it's not doing anything fancy like caching -- it's just occasionally looking at available wireless routers and locating from their broadcast.
Sometimes the location manager will also just report the billing address of your credit card if all else fails. And hey, a stopped clock is right twice a day.
Nice feature, pretty useless, though.