Tagged: Maps API Toggle Comment Threads | Keyboard Shortcuts

  • Joe 14:41 on June 9, 2009 Permalink
    Tags: Firefox 3.5, , Geolocation API, Google Gears, , Maps API,   

    Firefox 3.5 does geolocation! 

    Firefox crop circle
    Image by KonMan via Flickr

    Since early beta release of Firefox 3.1 there is experimental support for the experimental W3C Geolocation API.

    Now Doug Turner, one of the engineers who is behind the Geolocation support in Firefox, wrote a nice background story geolocation in Firefox 3.5 (hacks.mozilla.org). A very interesting read, and it turns out that geolocation is not only for mobile devices, but also available in regular Firefox versions, using wifi or IP address mapping.

    Using Firefox 3.5 or another location aware browser? Give it a try by clicking the button below, a map with your current location will be loaded…

    Note:

    • Firefox 3.5b4 has an annoying bug (#490046) which lets you get your location only once per run.
    • Privacy is an issue, Firefox asks for permission by showing a notification bar on top of the screen. Click “Tell them” to proceed…

      Click "tell Them"...

    Map your location…

    What the script does…

    // call native geolocation API:
    navigator.geolocation.getCurrentPosition(callback);
    
    // callback initializes a google map with the geo data:
    function callback(position) {
        ...
        var point = new GLatLng(position.coords.latitude, 
             position.coords.longitude);
        ...
    }
    

    Google provides a similar Geolocation API implementation through Gears.

    Got another browser where the API works? Please leave a comment!

    Reblog this post [with Zemanta]
     
    • Joe 09:45 on June 10, 2009 Permalink | Reply

      Update: indeed, the bug has been fixed in Firefox 3.5b99 – but some requests return a very unaccurate estimate, while others are perfect within only a few meters error.
      I guess in some cases Wifi is used, while in other cases generic Geo IP tables are used (e.g. if the Wifi lookup times out?).

    • Doug Turner 03:14 on June 23, 2009 Permalink | Reply

      exactly. if a wifi position is found, that is the location that is shared with the website. if no wifi position is found, a location based on IP is shared.

      Keep in mind, all of this is optional — we don’t share anything until you click “share location” in the notification bar.

      Hope that helps!
      Doug Turner

    • Johan Sundström 04:13 on June 24, 2009 Permalink | Reply

      Works fine in the iPhone 3G mobile Safari (OS 3.0) browser, too.

      • Joe 06:54 on June 24, 2009 Permalink | Reply

        Cool, thanks!

        It doesn’t work out of the box on Android’s Webkit browser on the G1, need Google’s interface for that apparently.

  • Joe 11:45 on March 29, 2007 Permalink
    Tags: access site, , , Benelux, Bernhard Seefeld, Brandon Badger, CRM, een site, GMaps Utility Library, , Maps API, New Foundland and Labrador, open web, Rotterdam, satellite imagery, Sidney Mock, USD, web crawler, web-applicatie te maken, www.nederkaart.nl   

    Google Geo Day 1 

    Google Geo Day, part 1

    Today the google geoday is held in Amsterdam Expo XXI

    The morning programme consisted of three speeches, most about google maps and google earth, focused towards developers who want to create mashups based on the maps API.

    A bunch of quick notes, some in Dutch (with the Dutch speakers mostly)

    (More …)

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel

Twitter links powered by Tweet This v1.8.3, a WordPress plugin for Twitter.