gourav
gourav

Reputation: 1397

how to test the Geo location identifier feature?

I have jut implemented the GEO location identifier using the GEO IP API?... could you please suggest how to test this feature... i am in new york... when i open up the site, its showing me th New York... But i don't know how to check for other cities... Please suggest.

Upvotes: 0

Views: 451

Answers (3)

Prashant Gonga
Prashant Gonga

Reputation: 11

Try using proxy server or for testing purpose can try to hardcode ip's of different geographical locations in your application. For list of public proxies, check the below link. http://hidemyass.com/proxy-list/1

Upvotes: 1

Zikes
Zikes

Reputation: 5886

You should be able to test other locations with a proxy service.

Upvotes: 3

powtac
powtac

Reputation: 41060

The second parameter for getCurrentPosition() is a callback for the failure case. In the third parameter you can set for how many seconds the browser should wait for a response (in my example 5 sec) and how long the result should be cached (in my example 1 h).

navigator.geolocation.getCurrentPosition(function(position) {
    alert('Success');
}, function() {
    alert('Fail!!!');
}, {maximumAge:60000, timeout: 5000});

Upvotes: 1

Related Questions