Well, that's the idea of having a standard (just like with XHR).  The
Google page in the original post is using the standard API on Safari
-- it works exactly the same way in Firefox 3.5 on any platform.  IE8
will supposedly has experimental support for the same API, and Opera
has a labs build that supports it:
<http://labs.opera.com/news/2009/03/26/>
I've heard it's in some builds of Chrome and Android, but haven't verified.

This is actually a much smoother, more unified process than XHR was.
All the major browser vendors participated, and they all seem to be
implementing it at about the same speed.

FWIW, it's a really simple API.  The "Hello world" example is just one line:
window.navigator.geolocation.getCurrentPosition( function(loc) {
alert(loc.coords.latitude+" "+loc.coords.longitude); } );
Try it in Firefox 3.5!

--Richard




On Thu, Jul 23, 2009 at 1:40 PM, Tom Longson (nym)<[email protected]> wrote:
> Yes, but like anything JavaScript you need to support the whole bag,
> not just a couple of browsers, so like XHR, you'll need a wrapper to
> tell it when it needs to use another API.
>
> Cheers,
> Tom Longson (nym)
> ------------------------------
> http://tomlongson.com
>
>
>
>
>
> On Thu, Jul 23, 2009 at 10:25 AM, Richard
> Barnes<[email protected]> wrote:
>> The W3C is getting close to standardizing a Javascript API that web
>> sites can use to get location from a device:
>> <http://www.w3.org/2008/geolocation/>
>>
>> It's supported in Firefox 3.5 and in Safari Mobile in iPhone OS 3.0.
>>
>> --Richard
>>
>> On Wed, Jul 22, 2009 at 12:44 PM, William J. Spat<[email protected]> wrote:
>>> Having recently noticed that Google has brought to the mobile web on the
>>> iPhone:
>>>
>>> http://www.techcrunch.com/2009/07/15/google-brings-location-to-the-mobile-we
>>> b-on-the-iphone/
>>>
>>> I was set to wondering if anyone has seen other interesting 'wanking where
>>> location is taken from the device and put in a browser?
>>>
>>> I was thinking particularly what might be possible on a BlackBerry?
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Geowanking mailing list
>>> [email protected]
>>> http://geowanking.org/mailman/listinfo/geowanking_geowanking.org
>>>
>>
>> _______________________________________________
>> Geowanking mailing list
>> [email protected]
>> http://geowanking.org/mailman/listinfo/geowanking_geowanking.org
>>
>

_______________________________________________
Geowanking mailing list
[email protected]
http://geowanking.org/mailman/listinfo/geowanking_geowanking.org

Reply via email to