Class Index | File Index

Classes


Class Geolocation


Defined in: phonegap.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This class provides access to device GPS data.
Field Summary
Field Attributes Field Name and Description
 
The last known GPS position.
Method Summary
Method Attributes Method Name and Description
 
clearWatch(watchId)
Clears the specified position watch.
 
getCurrentPosition(successCallback, errorCallback, options)
Asynchronously aquires the current position.
 
setError(message)
Called by the geolocation framework when an error occurs while looking up the current position.
 
setLocation(position)
Called by the geolocation framework when the current location is found.
 
watchPosition(successCallback, errorCallback, options)
Asynchronously aquires the position repeatedly at a given interval.
Class Detail
Geolocation()
This class provides access to device GPS data.
Field Detail
lastPosition
The last known GPS position.
Method Detail
clearWatch(watchId)
Clears the specified position watch.
Parameters:
{String} watchId
The ID of the watch returned from #watchPosition.

getCurrentPosition(successCallback, errorCallback, options)
Asynchronously aquires the current position.
Parameters:
{Function} successCallback
The function to call when the position data is available
{Function} errorCallback
The function to call when there is an error getting the position data.
{PositionOptions} options
The options for getting the position data such as timeout.

setError(message)
Called by the geolocation framework when an error occurs while looking up the current position.
Parameters:
{String} message
The text of the error message.

setLocation(position)
Called by the geolocation framework when the current location is found.
Parameters:
{PositionOptions} position
The current position.

watchPosition(successCallback, errorCallback, options)
Asynchronously aquires the position repeatedly at a given interval.
Parameters:
{Function} successCallback
The function to call each time the position data is available
{Function} errorCallback
The function to call when there is an error getting the position data.
{PositionOptions} options
The options for getting the position data such as timeout and the frequency of the watch.

Documentation generated by JsDoc Toolkit 2.1.0 on Tue May 05 2009 14:44:46 GMT-0700 (PDT)