Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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});

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

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