I know about the HTML5 method for creating geolocation, but the caveat is that it should ask the user for permission.
navigator.geolocation.getCurrentPosition
This becomes especially annoying when I would like to geolocate right on my home page to serve customized content based on location: no one likes to get a hint every time he or she visits your site.
The idea is to use external services for geolocation based on IP address or something similar to get a less accurate estimate of the user's location and give the user a hint only when that location is really disabled. Are there any good suggestions regarding the services that I can use for this purpose?
I know that Google has already done this: current location . It shows your current location without giving you any clues. Does anyone know how to do this?
The MaxMind database is good, but for this purpose it will require the maintenance of a huge IP database. Preferred is an API or Google service.
I am currently using the location object returned from Google Loader to estimate the location, but it is less accurate than the Google search example above.
google.loader.ClientLocation.latitude google.loader.ClientLocation.longitude
source share