CoreLocation.course
-------------------

Returns the direction in which the device is traveling.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CoreLocation](component_CoreLocation.md) | [2.7](newinversion27.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "CoreLocation.course" ) ### Parameters

none

### Result

Returns direction number.

### Description

Returns the direction in which the device is traveling.  
Course values are measured in degrees starting at due north and continuing clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is 180 degrees, and so on. Course values may not be available on all devices. A negative value indicates that the direction is invalid.  
This function queries current know location. It's updated from time to time. To receive a script call when new location is available, please use [CoreLocation.SetUpdateLocationHandler](CoreLocationSetUpdateLocationHandler.md).  
### Examples

Query course:

 Set Field \[ CoreLocation::course ; MBS ("CoreLocation.course") \]  
### See also

- [CoreLocation.purpose](CoreLocationpurpose.md)
- [CoreLocation.SetUpdateLocationHandler](CoreLocationSetUpdateLocationHandler.md)

### Example Databases

- [Mac and iOS/CoreLocation/CoreLocation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/CoreLocation/CoreLocation.shtml#2ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 13th January 2021

  
[CoreLocation.authorizationStatus](CoreLocationauthorizationStatus.md) - [CoreLocation.description](CoreLocationdescription.md)

[HTML Version](CoreLocationcourse.shtml)