ArcGIS Runtime SDK for iOS: AGSLocation Class Reference
ArcGIS Runtime SDK for iOS  100.9
AGSLocation Class Reference

Description

Represents a location update provided by a location datasource.

Instance of this class represent a location update that is provided by a location datasource.

Since
100
See also
AGSLocationDisplay
AGSLocationDataSource
Inheritance diagram for AGSLocation:
AGSObject

Instance Methods

(instancetype) - initWithPosition:horizontalAccuracy:velocity:course:lastKnown:
 
(instancetype) - initWithPosition:timestamp:horizontalAccuracy:verticalAccuracy:velocity:course:lastKnown:
 

Class Methods

(AGSLocation *) + locationWithCLLocation:
 
(instancetype) + locationWithPosition:horizontalAccuracy:velocity:course:lastKnown:
 
(instancetype) + locationWithPosition:timestamp:horizontalAccuracy:verticalAccuracy:velocity:course:lastKnown:
 

Properties

double course
 
double horizontalAccuracy
 
BOOL lastKnown
 
AGSPointposition
 
NSDate * timestamp
 
double velocity
 
double verticalAccuracy
 

Method Documentation

§ initWithPosition:horizontalAccuracy:velocity:course:lastKnown:()

- (instancetype) initWithPosition: (AGSPoint *)  position
horizontalAccuracy: (double)  horizontalAccuracy
velocity: (double)  velocity
course: (double)  course
lastKnown: (BOOL)  lastKnown 

Initializes a location update with provided information.

Parameters
positionThe coordinates of the location
horizontalAccuracyThe radius of uncertainty for the location, measured in meters.
velocityat which the device is traveling in meters per second
courseThe direction in which the device is traveling, measured in degrees starting at due north and continuing clockwise around the compass.
lastKnownIndicates whether the information is current or based on a last known update (for example, in the case of deferred location updates).
Returns
An initialized representation of a location update
Since
100

§ initWithPosition:timestamp:horizontalAccuracy:verticalAccuracy:velocity:course:lastKnown:()

- (instancetype) initWithPosition: (AGSPoint *)  position
timestamp: (NSDate *)  timestamp
horizontalAccuracy: (double)  horizontalAccuracy
verticalAccuracy: (double)  verticalAccuracy
velocity: (double)  velocity
course: (double)  course
lastKnown: (BOOL)  lastKnown 

Initializes a location update with the provided information

Parameters
positionThe coordinates of the location
timestampThe date and time the location was determined
horizontalAccuracyThe radius of uncertainty for the location, measured in meters.
verticalAccuracyThe accuracy of the vertical component of the location, measured in meters.
velocityat which the device is traveling in meters per second
courseThe direction in which the device is traveling, measured in degrees starting at due north and continuing clockwise around the compass.
lastKnownIndicates whether the information is current or based on a last known update (for example, in the case of deferred location updates).
Returns
An initialized representation of a location update
Since
100.2.1

§ locationWithCLLocation:()

+ (AGSLocation*) locationWithCLLocation: (CLLocation *)  cllocation

Initializes a location update with the provided information

Note
If the provided CLLocation has a timestamp more than 30 seconds in the past, the returned AGSLocation will have lastKnown set to true, otherwise it will be considered current and lastKnown will be false.
Parameters
cllocationrepresenting the location data generated by CLLocationManager
Returns
An initialized representation of a location update
Since
100

§ locationWithPosition:horizontalAccuracy:velocity:course:lastKnown:()

+ (instancetype) locationWithPosition: (AGSPoint *)  position
horizontalAccuracy: (double)  horizontalAccuracy
velocity: (double)  velocity
course: (double)  course
lastKnown: (BOOL)  lastKnown 

Initializes a location update with the provided information

Parameters
positionThe coordinates of the location
horizontalAccuracyThe radius of uncertainty for the location, measured in meters.
velocityat which the device is traveling in meters per second
courseThe direction in which the device is traveling, measured in degrees starting at due north and continuing clockwise around the compass.
lastKnownIndicates whether the information is current or based on a last known update (for example, in the case of deferred location updates).
Returns
An initialized representation of a location update
Since
100

§ locationWithPosition:timestamp:horizontalAccuracy:verticalAccuracy:velocity:course:lastKnown:()

+ (instancetype) locationWithPosition: (AGSPoint *)  position
timestamp: (NSDate *)  timestamp
horizontalAccuracy: (double)  horizontalAccuracy
verticalAccuracy: (double)  verticalAccuracy
velocity: (double)  velocity
course: (double)  course
lastKnown: (BOOL)  lastKnown 

Initializes a location update with the provided information

Parameters
positionThe coordinates of the location
timestampThe date and time the location was determined
horizontalAccuracyThe radius of uncertainty for the location, measured in meters.
verticalAccuracyThe accuracy of the vertical component of the location, measured in meters.
velocityat which the device is traveling in meters per second
courseThe direction in which the device is traveling, measured in degrees starting at due north and continuing clockwise around the compass.
lastKnownIndicates whether the information is current or based on a last known update (for example, in the case of deferred location updates).
Returns
An initialized representation of a location update
Since
100.2.1

Property Documentation

§ course

- (double) course
readnonatomicassign

The direction in which the device is traveling, 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.

Since
100

§ horizontalAccuracy

- (double) horizontalAccuracy
readnonatomicassign

The radius of uncertainty for the location, measured in meters. The location’s position identifies the center of the circle, and this value indicates the radius of that circle. A negative value indicates that the location’s position is invalid.

Since
100

§ lastKnown

- (BOOL) lastKnown
readnonatomicassign

Indicates whether the location information is current or based on a last known update (for example, in the case of deferred location updates). Last known locations are symbolized differently using AGSLocationDisplay::acquiringSymbol.

Since
100

§ position

- (AGSPoint*) position
readnonatomicstrong

The coordinates of the location

Since
100

§ timestamp

- (NSDate*) timestamp
readnonatomicstrong

The time the location was determined.

Since
100.2.1

§ velocity

- (double) velocity
readnonatomicassign

The instantaneous speed of the device in meters per second

Since
100

§ verticalAccuracy

- (double) verticalAccuracy
readnonatomicassign

The accuracy of the location's vertical component, in meters.

Since
100.2.1