3

I'm developing a web app where it requires me to simulate the latitude and longitude values in my browser for geolocation testing.

Has anybody has experience in testing gelocation based apps?

Thanks in advance!

1

1 Answer 1

7

Faking geolocations

There are many reasons why you would want to fake your location in firefox. One good reason would be “un-faking” your location on computers with no wlan cards, e.g. at work, or where there’s no data available for the WLANs around you. All you need for faking is a text file (eg. /home/username/.mynewlocation.txt) somewhere on your computer with the following content:

{"location":{"latitude":50.941863,"longitude":6.958374, "accuracy":20.0}} 

The path in Firefox to this file is: file://home/username/.mynewlocation.txt Type about:config in your location bar, confirm the warning, search for geo.wifi.url, and replace the old url (https://www.google.com/loc/json) with your new one from above. Restart firefox, enjoy your new location :-)

Explanation: latitude/longitude => the location you want to have, go to google maps, select location, click on “Link” and use the values from the ll= parameter accuracy => the accuracy you want to announce, in meters.

2
  • Thanks Nils for the quick response! :)
    – abhiomkar
    Jul 28, 2011 at 7:01
  • I'll try your method and let you know if it works :) I can use: itouchmap.com/latlong.html to get lat & longt values
    – abhiomkar
    Jul 28, 2011 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.