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

Danny Beckett
- 20,529
- 24
- 107
- 134

tfont
- 10,891
- 7
- 56
- 52
2 Answers
3
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.

Quentin
- 914,110
- 126
- 1,211
- 1,335
1
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

Andrew - OpenGeoCode
- 2,299
- 18
- 15