Labs/Geode: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Geode is based on the [http://dev.w3.org/geo/api/spec-source.html W3C specification for geolocation] in the browser. In particular it implements
Geode is based on the [http://dev.w3.org/geo/api/spec-source.html W3C specification for geolocation] in the browser. In particular it implements


   navigator.lastPosition
   navigator.geolocation.lastPosition
   navigator.getCurrentPosition( successCallback, errorCallback, options )
   navigator.geolocation.getCurrentPosition( successCallback, errorCallback, options )
   navigator.watchPosition (successCallback, errorCallback, options)
   navigator.geolocation.watchPosition (successCallback, errorCallback, options)
   navigator.clearWatch( watchID )
   navigator.geolocation.clearWatch( watchID )


The option argument for both <code>getCurrentPosition</code> and <code>watchPosition</code> functions is ignored. Also, because of various implementation details, <code>watchPosition</code> will call the callback every 30 seconds even if you haven't moved.
The option argument for both <code>getCurrentPosition</code> and <code>watchPosition</code> functions is ignored. Also, because of various implementation details, <code>watchPosition</code> will call the callback every 30 seconds even if you haven't moved.

Revision as of 06:17, 7 October 2008

Geode is based on the W3C specification for geolocation in the browser. In particular it implements

 navigator.geolocation.lastPosition
 navigator.geolocation.getCurrentPosition( successCallback, errorCallback, options )
 navigator.geolocation.watchPosition (successCallback, errorCallback, options)
 navigator.geolocation.clearWatch( watchID )

The option argument for both getCurrentPosition and watchPosition functions is ignored. Also, because of various implementation details, watchPosition will call the callback every 30 seconds even if you haven't moved.