Name: locationChanged

Type: message

Syntax: locationChanged <latitude>, <longitude>, <altitude> 

Summary: Sent to the current card of the default stack when the location of the device changes.

Introduced: 4.5.2

OS: ios,android

Platforms: mobile

Example:
on locationChanged pLatitude, pLongitude, pAltitude
   put pAltitude into field "altitude"
end locationChanged

Example:
on locationChanged
   put mobileCurrentLocation() into theLocation
   updateMapPosition theLocation -- update the marker on the map showing the current location
end locationChanged

Parameters:
latitude: the latitude of the device
longitude: the longitude of the device
altitude: the altitude of the device

Description:
Handle the <locationChanged> message if you want to perform tasks when the location of the device changes.

The <locationChanged> message is sent to the current card of the default stack when the location of the device changes. 

If location tracking cannot be started (typically due to the user 'not allowing' access to CoreLocation) then a trackingError message is sent instead.

References: mobileStopTrackingSensor (command), mobileStartTrackingSensor (command), mobileCurrentLocation (function), trackingError (message)
