W3C home > Mailing lists > Public > public-geolocation@w3.org > June 2008

Re: Geolocation API

From: Doug Turner <doug.turner@gmail.com>
Date: Fri, 13 Jun 2008 08:26:26 -0700
Cc: Alec Berntson <alecb@windows.microsoft.com>, "public-geolocation@w3c.org" <public-geolocation@w3c.org>
Message-Id: <0832BDF3-5654-444A-B2C7-6232DDAE7752@gmail.com>
To: Jon Ferraiolo <jferrai@us.ibm.com>

On Jun 13, 2008, at 7:50 AM, Jon Ferraiolo wrote:

> Two comments:
>
> (1) I think pretty much all device APIs (location, battery,  
> connection status, SMS message queue, camera, ...) should have  
> asynchronous APIs. Certainly in the general case not every API will  
> be able to respond synchronously. Some implementations might require  
> some network communication for either completion of the operation or  
> verify identity and credentials. Since at least some of the future  
> set of mobile device APIs will need to be asynchronous and that in  
> at least some cases (albeit perhaps a small percentage) the  
> geolocation API in particular will need to be asynchronous, I  
> suggest that the geolocation API have an async design (i.e., the  
> "getlocation()" method passes a callback function).
>

In agreement regarding async apis for Geolocation.  I do not know what  
we will do with the other device APIs;  probably off topic.


> (2) For notification APIs (e.g., listenForReports()), why not use  
> AddEventListener and therefore leverage DOM events?
>

Not a bad idea, but the current APIs are passing options when setting  
up the listener.  How would you handle that?

Regards,
Doug
Received on Friday, 13 June 2008 15:40:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 March 2012 18:13:39 GMT