public class CLLocationManager extends NSObject
Constructor and Description |
---|
CLLocationManager() |
Modifier and Type | Method and Description |
---|---|
CLLocationManagerDelegate |
delegate()
Returns the delegate for handling location data.
|
double |
desiredAccuracy()
Returns the accuracy of the location.
|
void |
dismissHeadingCalibrationDisplay()
Stops displaying heading calibration view.
|
double |
distanceFilter()
Returns the minimum horizontal distance that the device must move before
it causes a location update.
|
CLHeading |
heading()
Returns the current heading of the device (recently recorded).
|
static boolean |
headingAvailable()
Returns a Boolean that shows whether heading events are available.
|
double |
headingFilter()
Returns the minimum heading change that causes heading update.
|
int |
headingOrientation()
Returns the orientation used for heading computations.
|
CLLocation |
location()
Returns the current location of the device (recently recorded).
|
static boolean |
locationServicesEnabled()
Returns a Boolean that shows whether location services are enabled.
|
double |
maximumRegionMonitoringDistance()
Returns the maximum distance concerning the bounds of a region.
|
Set<CLRegion> |
monitoredRegions()
Returns the set of shared CLRegions being monitored by the location
manager objects of this application.
|
String |
purpose()
Deprecated.
|
static boolean |
regionMonitoringAvailable()
Deprecated.
|
static boolean |
regionMonitoringEnabled()
Returns a Boolean that shows whether region monitoring is currently
activated.
|
void |
setDelegate(CLLocationManagerDelegate delegate)
Sets the delegate for handling location data.
|
void |
setDesiredAccuracy(double desiredAccuracy)
Sets the accuracy of the location.
|
void |
setDistanceFilter(double distanceFilter)
Sets the minimum horizontal distance that the device must move before it
causes a location update.
|
void |
setHeadingFilter(double headingFilter)
Sets the minimum heading change that causes heading update.
|
void |
setHeadingOrientation(int headingOrientation)
Sets the orientation used for heading computations.
|
void |
setPurpose(String purpose)
Sets a string value that defines the purpose of location service use for
the particular application.
|
static boolean |
significantLocationChangeMonitoringAvailable()
Returns a Boolean that shows whether tracking of significant location
changes is available.
|
void |
startMonitoringForRegion(CLRegion region,
double accuracy)
Deprecated.
|
void |
startMonitoringSignificantLocationChanges()
Allows generating location events triggered by significant location
changes.
|
void |
startUpdatingHeading()
Enables heading updates.
|
void |
startUpdatingLocation()
Allows location updates.
|
void |
stopMonitoringForRegion(CLRegion region)
Stops monitoring the specified region.
|
void |
stopMonitoringSignificantLocationChanges()
Prevents generating location events triggered by significant location
changes.
|
void |
stopUpdatingHeading()
Disables heading updates.
|
void |
stopUpdatingLocation()
Prevents location updates.
|
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public static boolean locationServicesEnabled()
public static boolean significantLocationChangeMonitoringAvailable()
public void startUpdatingLocation()
public void stopUpdatingLocation()
public void startMonitoringSignificantLocationChanges()
public void stopMonitoringSignificantLocationChanges()
public static boolean headingAvailable()
@Deprecated public static boolean regionMonitoringAvailable()
public static boolean regionMonitoringEnabled()
public void startUpdatingHeading()
public void stopUpdatingHeading()
public void dismissHeadingCalibrationDisplay()
@Deprecated public void startMonitoringForRegion(CLRegion region, double accuracy)
region
- The region that is about to be monitored.accuracy
- The accuracy of monitoring.public void stopMonitoringForRegion(CLRegion region)
region
- The region that is currently being monitored.public CLLocationManagerDelegate delegate()
public void setDelegate(CLLocationManagerDelegate delegate)
delegate
- The delegate for handling location datapublic double desiredAccuracy()
public void setDesiredAccuracy(double desiredAccuracy)
desiredAccuracy
- The accuracy of the location.public double distanceFilter()
public void setDistanceFilter(double distanceFilter)
distanceFilter
- The minimum horizontal distance that the device
must move before it causes a location update.public double headingFilter()
public void setHeadingFilter(double headingFilter)
headingFilter
- The minimum heading change that causes heading
update.public int headingOrientation()
public void setHeadingOrientation(int headingOrientation)
headingOrientation
- The orientation used for heading computations.public Set<CLRegion> monitoredRegions()
public double maximumRegionMonitoringDistance()
public CLHeading heading()
public CLLocation location()
@Deprecated public String purpose()
public void setPurpose(String purpose)
purpose
- The purpose of location service for the application.Copyright © 2020. All rights reserved.