Helper to easily add global geolocation to an app via navigator.geolocation (Phonegap).
Static function that calculate the distance between two points on Earth
Parameters
pointA: object, {latitude, longitude}
pointB: object, {latitude, longitude}
Returns: int, distance in meters
Get the current GPS coordinates
Parameters
options: object, Same options as navigator.geolocation.watchPosition
Fires: locationSuccess when a location is found (a Position object is passed)
Fires: currentPositionSuccess when a location is found (a Position object is passed)
Fires: locationError when an error occur (an Error object is passed)
Fires: currentPositionError when an error occur (an Error object is passed)
Start the tracking
Fires: event:trackingStart
Stop the tracking
Fires: event:trackingStop
Toggle the geolocation tracking
Fires: event:trackingStart if the tracking has been started
Fires: event:trackingStop if the tracking has been stopped
Returns: Boolean, true if the tracking has been started, false otherwise
Helper to easily add global geolocation to an app via navigator.geolocation (Phonegap).
Returns: Boolean, true if the tracking is started, false otherwise
Helper to easily add global geolocation to an app via navigator.geolocation (Phonegap).
Returns: Position, the last known position