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.
12 Comments
I couldn’t get it to work. I tried:
40°46’25.22″N 111°52’53.79″W
and
40.773663,-111.881599
What would leaving this pref blank result in?
For that matter, this–https://www.google.com/loc/json–is what is currently in mine. What, if anything, does this mean?
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!)
I used a data: URI there, no point bothering a website just to get a fixed response.
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.
that is even better!
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?
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.
Unless the users’ goal is to further thwart their location being known.
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.
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
[...] 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 [...]
[...] for Mobile Geolocation – Setting your position manually – http://dougt.org/wordpre…; 18 hours [...]