Question

Are there any other methods besides using navigator.geolocation to get access to a user's longitude and latitude location in JavaScript?

Was it helpful?

Solution

Other than using Ajax to get data from an external service that approximates it based on the IP address the request came from, which is an indirect method, no.

OTHER TIPS

If you decide to use a geo IP location service, try freegeoip.net. It is a free (public) service maintained by community donations. You get 10,000 lookups per hour.
My job is in Vancouver, WA and when I used the service with the IP of my workstation, I got the right result (freegeoip.net/xml/):
- 216.65.151.102 US United States WA Washington Vancouver * removed by me removed by me * 820 360
If you don't mind paying, MaxMind offers a really good service at $20 per 10,000 lookups.
http://www.maxmind.com/en/web_services

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top