Geolocation – Setting your position manually

I thought that this was written down somwhere, but I couldn’t easily find it…. so

If you know how to muck with about:config, there is an easy way to set your location manually.  First figure out your longitude and latitude.  There area bunch of tools on the web that gets you this.  Once you have this, you can do the following:

1) Open up about:config

2) search for geo.wifi.uri

3) change the value to:

http://snaptome.appspot.com/loc/json?latitude=your_lat&longitude=your_lon&accuracy=10

Thats it.  I hope this helps.

This entry was posted in mozilla and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

12 Comments

  1. Gump
    Posted June 26, 2010 at 12:49 pm | Permalink

    I couldn’t get it to work. I tried:

    40°46’25.22″N 111°52’53.79″W
    and
    40.773663,-111.881599

  2. Ray R
    Posted June 26, 2010 at 2:01 pm | Permalink

    What would leaving this pref blank result in?

  3. Ray R
    Posted June 26, 2010 at 2:04 pm | Permalink

    For that matter, this–https://www.google.com/loc/json–is what is currently in mine. What, if anything, does this mean?

    • skierpage
      Posted June 28, 2010 at 6:20 pm | Permalink

      Ray, read http://www.mozilla.com/en-US/firefox/geolocation/
      “If you consent, Firefox gathers information about nearby wireless access points and your computer’s IP address. Then Firefox sends this information to the default geolocation service provider, Google Location Services, to get an estimate of your location. That location estimate is then shared with the requesting website”

      Note that regardless of what you set and even if you don’t consent to geolocation, every web site you access gets your IP address and can narrow down your location using that unless you’re using a proxy or anonymizer. (I think the Firefox doc should prominently say this!)

  4. Posted June 26, 2010 at 3:20 pm | Permalink

    I used a data: URI there, no point bothering a website just to get a fixed response.

  5. skierpage
    Posted June 28, 2010 at 6:01 pm | Permalink

    Instead of sharing your position with snaptome, why not store your location in a local data URI? All snaptome does is return a piece of JSON.

    If your location is 38.897613,-77.036583, then snaptome returns {“location”:{“latitude”:38.897613,”longitude”:-77.036583,”accuracy”:10}}

    You can turn this into a data: URI using Hixie’s data: URI kitchen http://software.hixie.ch/utilities/cgi/data/data . It seems you don’t even have to base64 it or supply an encoding, so it becomes

    data:application/json,{“location”%3A{“latitude”%3A38.897613%2C”longitude”%3A-77.036583%2C”accuracy”%3A10}}

    use that as the value of geo.wifi.uri , and hey presto, the geolocation demo http://maxheapsize.com/static/html5geolocationdemo.html works in nightly Firefox!

    It seems straightforward for an adept hacker to develop the WhereImmaAt extension that lets you enter/choose from a set of locations.

    BTW, to get your location from Google Maps, choose “Center map here” from the context menu, then click the Link link above and to the right of the map, and the ll= parameter in the URL holds lat and longitude.

  6. Ray R
    Posted June 29, 2010 at 3:34 pm | Permalink

    Thanks for the info.

    What if we were to blank out/erase Google Location Services? Will the prevent anything other than my ISP’s IP address being “located” regardless of if we do or don’t allow geolocation to operate?

    • Posted June 29, 2010 at 3:39 pm | Permalink

      No, we would still need to use something to convert your IP address into a lat/lon.

      Take a look at what skierpage did above. You could use something like that, and just provide a very truncated lat/lon and a large accuracy value.

      • Ray R
        Posted June 30, 2010 at 3:38 pm | Permalink

        Unless the users’ goal is to further thwart their location being known.

  7. Marc
    Posted July 2, 2010 at 1:30 am | Permalink

    Thanks for the tip. I was happy to find that this also works in Opera 10.60. Just go to ‘opera:config’ in your browser, look up the ‘Location Provider URL’ setting, enter ‘http://snaptome.appspot.com/loc/json?latitude=your_lat&longitude=your_lon&accuracy=10′ and click the ‘save’ button.

  8. skierpage
    Posted July 10, 2010 at 5:21 pm | Permalink

    Judging from its screencast, “ReLuc”‘s Geolocater add-on https://addons.mozilla.org/en-US/firefox/addon/14046/ lets you maintain and then pick from a bunch of locations. Looks very nice, not compatible with Firefox 4.0b2pre/3.7a1pre.

    @RayR, you can stop a site using the geolocate JavaScript API from finding your position by a) choosing “Never share” in response to Firefox’s geolocate prompt or b) using this technique or that add-on to lie about where you are. But a site can still figure out your location from your IP address without asking for permission; to stop that, you must use a proxy.

2 Trackbacks

  1. [...] your_lat and your_lon to your latitude and longitude. Now, you can check correctness here. Thanks Doug Turner for the tip. Must Read These Posts:Opera Browser Gets Geolocation (development [...]

  2. [...] for Mobile Geolocation – Setting your position manually – http://dougt.org/wordpre…; 18 hours [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>