If memory serves me correctly, google does this for the maps site. I know google\'s mobile maps app can determine the rough location (I assume using some kind of cell tower
You have Google API Documentation on this:
http://code.google.com/apis/gears/geolocation_network_protocol.html
Hope it helps...