Maps uses both the cellular towers and a program called Skyhook. For the iPhone anyway. iPod touches only can use Skyhook. So if you're on a wireless network thats not in Skyhook's database, it won't work.
unless they get cloud to register the location of all their hot spots like with skyhook i guess it will not work on touch. of course you would also need cloud membership.
they could have had a 'backup' system based on IP address for when the Skyhook system is not available. I know that the IP address at work for example traces to within 1/2 mile on internet maps. Try it with your IP address - there are plenty of these sites around...
Maybe not perfect location info but gives a general idea 😀