Oct 102008

I’ve posted the article “Using geolocation“, which provides introductory information on using the new geolocation API being introduced in Firefox 3.1.  I’ll be adding a working example tomorrow (later today, actually, now that I look at my clock and see it’s already Friday).  I’ve also not yet documented the interfaces behind geolocation, but I’ll be doing those tomorrow.

As always, if you happen to notice any errors, please feel free to correct them or let me know what needs fixing so I can do it.


 Posted by at 12:45 AM

  6 Responses to “Geolocation goodness”

  1. I’ve added Geolocation support to BrowserSpy.dk. It’s online at http://browserspy.dk/geolocation.php
    Perhaps you could add the link to the article?

  2. Great article, but I noticed a mistake.

    In the example for “Watching the current position”, you use the function getCurrentPosition, instead of watchPosition. Also it would be great to have some more information about how frequently the position is updated.

    Also for position.velocity, in which direction is it calculated (latitude, longitude, altitude)? If it’s directionless then surely it’s better renamed to speed, not velocity – see Wikipedia for the distinction.

  3. What geolocation data is being used here? Is this allowing sites to view my current location? Questions: (1) How many computers today actually have geolocation hardware so that they will know where the computer is? and (2) How can I restrict this information? I don’t want random sites to know exactly where I am in the world…

  4. Chris — you’re right, IMHO it should be “speed” rather than “velocity.” I’ll suggest that.

    Jason — The user is asked for permission before revealing location information. Currently, Firefox uses Skyhook’s database (the same one used by the iPod touch and iPhone, for example). It is/will be possible to develop additional data providers for location information, and I’m sure Fennec will offer GPS support for example.

  5. I’ve updated the documentation with information about requesting permission and about the Skyhook database being the default information source.

  6. I need to clarify — I was wrong; there are no built-in data providers for geolocation information, and Skyhook support is not planned.