Platforms to show: All Mac Windows Linux Cross-Platform

CLLocationManagerMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreLocation MBS MacFrameworks Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
The CoreLocation base class.
Example
Var c as new CLLocationManagerMBS

c.startUpdatingLocation

The CLLocationManagerMBS class defines the interface for configuring the delivery of location- and heading-related events to your application. You use an instance of this class to establish the parameters that determine when location and heading events should be delivered. You can also a location manager object to retrieve the most recent location data.

To use a CLLocationManagerMBS object to deliver location events, create an instance, configure the desired accuracy and distance filter values, and call the startUpdatingLocation method. The location service returns an initial location as quickly as possible, returning cached information when available. After delivery of the initial event notification, the CLLocationManagerMBS object may deliver additional events if the minimum threshold distance (as specified by the distanceFilter property) is exceeded or a more accurate location value is determined.

Important: The user has the option of denying an application's access to the location service data. During its initial uses by an application, the Core Location framework prompts the user to confirm that using the location service is acceptable. If the user denies the request, the CLLocationManagerMBS object reports an appropriate error to its delegate during future requests.

See also documentation from Apple for the CLLocationManager class:
https://developer.apple.com/library/mac/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html

See WindowsLocationManagerMBS class for Windows.

Constants

Constant Value Description
kCLErrorDenied 1 One of the error codes reported by the location manager error event. Access to the location service was denied by the user.
kCLErrorLocationUnknown 0 One of the error codes reported by the location manager error event. The location manager was unable to obtain a location value right now.

Authorization Status Constants.

Constant Value Description
kCLAuthorizationStatusAuthorized 3 This application is authorized to use location services.
kCLAuthorizationStatusDenied 2 The user explicitly denied the use of location services for this application or location services are currently disabled in Settings.
kCLAuthorizationStatusNotDetermined 0 The user has not yet made a choice regarding whether this application can use location services.
kCLAuthorizationStatusRestricted 1 This application is not authorized to use location services. The user cannot change this application's status, possibly due to active restrictions such as parental controls being in place.

Device Orientation Constants

Constant Value Description
kCLDeviceOrientationFaceDown 6 The device is held parallel to the ground with the screen facing downwards.
kCLDeviceOrientationFaceUp 5 The device is held parallel to the ground with the screen facing upwards.
kCLDeviceOrientationLandscapeLeft 3 The device is in landscape mode, with the device held upright and the home button on the right side.
kCLDeviceOrientationLandscapeRight 4 The device is in landscape mode, with the device held upright and the home button on the left side.
kCLDeviceOrientationPortrait 1 The device is in portrait mode, with the device held upright and the home button at the bottom.
kCLDeviceOrientationPortraitUpsideDown 2 The device is in portrait mode but upside down, with the device held upright and the home button at the top.
kCLDeviceOrientationUnknown 0 The orientation is currently not known.

Corelocation Error Codes

Constant Value Description
kCLErrorGeocodeCanceled 10 The geocode request was canceled.
kCLErrorGeocodeFoundNoResult 8 The geocode request yielded no result.
kCLErrorGeocodeFoundPartialResult 9 The geocode request yielded a partial result.
kCLErrorHeadingFailure 3 The heading could not be determined.
kCLErrorNetwork 2 The network was unavailable or a network error occurred.
kCLErrorRegionMonitoringDenied 4 Access to the region monitoring service was denied by the user.
kCLErrorRegionMonitoringFailure 5 A registered region cannot be monitored.
kCLErrorRegionMonitoringResponseDelayed 7 Core Location will deliver events but they may be delayed.
kCLErrorRegionMonitoringSetupDelayed 6 Core Location could not initialize the region monitoring feature immediately.

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Videos


The items on this page are in the following plugins: MBS MacFrameworks Plugin.


CLLocationCoordinate2DMBS   -   CLLocationMBS


The biggest plugin in space...