I found a few examples suggesting Google AJAX APIs.
This link typifies the advice I have found so far: http://briancray.com/2009/05/29/find-web-visitors-location-javascript-google-api/
However, the location is often wrong with the Google APIs.
Other sites seem to know exactly which city I'm in, though, without me entering any information.
Suggestions? Is there something cross-browser (ignoring IE6) and reliable?
Your browser uses different types and sources of information to identify your location. These include your IP address, geolocation via HTML5 in your browser, and your PC's language and time settings.
Accuracy varies but is typically within 5-15 metres. Vendors such as Combain (https://combain.com/about/about-positioning/wi-fi-positioning/) are also proposing making floor level WiFi positioning accuracy within a building, something that GPS cannot deliver.
IP-based geolocation services provide 55 percent to 80 percent accuracy for a user's region or state. And they provide 50 percent to 75 percent accuracy for a user's city. In practice, the actual accuracy may vary from provider to provider and depending on the location of the device.
The GPS receiver in your mobile device compares the time signals it receives from the satellites with its internal clock. Knowing the speed of light and when the signals were sent and received, your device can calculate your distance from each satellite, and thereby home in on your longitude, latitude and altitude.
I was going to answer with a few points but sometimes referencing a decent article is the way to go. I recently came across this Smashing Magazine article by Christian Heilmann which explains the issues, solutions and further info on all things GeoLocational.
Entering the wonderful world of Geolocation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With