Also, from what I understand, Wifi can be used to obtain your location using two ways:
1) Google's streetview car was claimed to record all the wifi ap's (and it's mac address) it sees as it drives around and logs the location of each and puts it into googles database.
2) When your device obtains a gps/cell location AND if you are connected to a Wifi AP, I believe it sends the AP name, Mac address and the location back to google servers so when other devices are connected to that wifi ap, google will know the location even if gps is turned off.