Name: mobileCurrentLocation

Type: function

Syntax: mobileCurrentLocation()

Summary: Returns the current location of the device.

Synonyms: iphoneCurrentLocation()

Introduced: 4.5.2

OS: ios,android

Platforms: mobile

Example:
put mobileCurrentLocation() into theLocation

Returns (enum): If location tracking has been enabled the <mobileCurrentLocation> function returns an array with the following keys
- horizontal accuracy : the maximum error in meters of the position indicated by longitude and latitude
- latitude : the latitude of the current location, measured in degrees relative to the equator. Positive values indicate positions in the Northern Hemisphere, negative values in the Southern.
- longitude : the longitude of the current location, measured in degrees relative to the zero meridian. Positive values extend east of the meridian, negative values extend west.
- vertical accuracy : the maximum error in meters of the altitude value.
- altitude : the distance in meters of the height of the device relative to sea:level. Positive values extend upward of sea:level, negative values downward.
- timestamp : the time at which the measurement was taken, in seconds since 1970.

If the latitude and longitude could not be measured, those keys together with the horizontal accuracy key will not be present. If the altitude could not be measured, that key together with the vertical accuracy will not be present.

If location tracking has not been enabled the <mobileCurrentLocation> function returns empty

Description:
Use the <mobileCurrentLocation> function to find the current location of the device.

Use the <mobileCurrentLocation> function to find the current location of the device. If location tracking has not been enabled this function returns empty. Otherwise it returns an array.

References: mobileStopTrackingSensor (command), mobileStartTrackingSensor (command), mobileSensorReading (function), trackingError (message), locationChanged (message)
