Utilizes the device’s GPS, giving you geographic location of the device.
altitude
The altitude in meters.
Syntax:
lg.location.altitude;
Returns:
- (float) Altitude.
Example:
var altitude = lg.location.altitude;
direction
Direction device is moving.
Syntax:
lg.location.direction;
Returns:
- (float) Direction.
Example:
var direction = lg.location.direction;
error
Error object can be retrieved from this property if an error occurs.
Syntax:
lg.location.error;
Returns:
- (object) Error object.
Example:
var error = lg.location.error;
latitude
The geographical latitude.
Syntax:
lg.location.latitude;
Returns:
- (float) Latitude.
Example:
var latitude = lg.location.latitude;
longitude
The geographical longitude.
Syntax:
lg.location.longitude;
Returns:
- (float) Longitude.
Example:
var longitude = lg.location.longitude;
speed
The instantaneous speed of the device.
Syntax:
lg.location.speed;
Returns:
- (float) Speed.
Example:
var speed = lg.location.speed;
start
Starts updating the GPS location. An update interval may be used, otherwise .5 seconds is used.
Syntax:
lg.location.start(update);
Arguments:
- update – (float) Update interval.
stop
Stops updating the GPS location.
Syntax:
lg.location.stop();
