ArcGIS Runtime SDK for iOS: AGSLocation.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSLocation.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24 
25 #import <Foundation/Foundation.h>
26 #import <ArcGIS/AGSObject.h>
27 #import <CoreLocation/CLLocation.h>
28 #import <ArcGIS/AGSDefines.h>
29 
30 @class AGSPoint;
31 
32 
33 
38 typedef NSString *AGSLocationSourcePropertyKey NS_TYPED_EXTENSIBLE_ENUM;
39 
46 AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyFloor;
47 
54 AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyPositionSource;
55 
60 AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeySatelliteCount;
61 
72 @interface AGSLocation : AGSObject
73 
74 #pragma mark -
75 #pragma mark initializers
76 
77 
78 
89 -(instancetype)initWithPosition:(AGSPoint*)position horizontalAccuracy:(double)horizontalAccuracy velocity:(double)velocity course:(double)course lastKnown:(BOOL)lastKnown;
90 
103 -(instancetype)initWithPosition:(AGSPoint*)position
104  timestamp:(NSDate*)timestamp
105  horizontalAccuracy:(double)horizontalAccuracy
106  verticalAccuracy:(double)verticalAccuracy
107  velocity:(double)velocity
108  course:(double)course
109  lastKnown:(BOOL)lastKnown;
110 
146 - (instancetype)initWithPosition:(AGSPoint *)position
147  timestamp:(nullable NSDate *)timestamp
148  horizontalAccuracy:(double)horizontalAccuracy
149  verticalAccuracy:(double)verticalAccuracy
150  velocity:(double)velocity
151  course:(double)course
152  lastKnown:(BOOL)lastKnown
153  additionalSourceProperties:(NSDictionary<AGSLocationSourcePropertyKey, id> *)additionalSourceProperties;
154 
165 +(instancetype)locationWithPosition:(AGSPoint*)position horizontalAccuracy:(double)horizontalAccuracy velocity:(double)velocity course:(double)course lastKnown:(BOOL)lastKnown;
166 
181 +(instancetype)locationWithPosition:(AGSPoint*)position
182  timestamp:(NSDate*)timestamp
183  horizontalAccuracy:(double)horizontalAccuracy
184  verticalAccuracy:(double)verticalAccuracy
185  velocity:(double)velocity
186  course:(double)course
187  lastKnown:(BOOL)lastKnown;
188 
226 + (instancetype)locationWithPosition:(AGSPoint *)position
227  timestamp:(nullable NSDate *)timestamp
228  horizontalAccuracy:(double)horizontalAccuracy
229  verticalAccuracy:(double)verticalAccuracy
230  velocity:(double)velocity
231  course:(double)course
232  lastKnown:(BOOL)lastKnown
233  additionalSourceProperties:(NSDictionary<AGSLocationSourcePropertyKey, id> *)additionalSourceProperties;
234 
242 +(AGSLocation*)locationWithCLLocation:(CLLocation*)cllocation;
243 
244 #pragma mark -
245 #pragma mark properties
246 
281 @property (nonatomic, copy, readonly) NSDictionary<AGSLocationSourcePropertyKey, id> *additionalSourceProperties;
282 
288 @property (nonatomic, assign, readonly) double course;
289 
294 @property (nonatomic, assign, readonly) double horizontalAccuracy;
295 
299 @property (nonatomic, assign, readonly) BOOL lastKnown;
300 
304 @property (nullable, nonatomic, strong, readonly) AGSPoint *position;
305 
309 @property (nonatomic, assign, readonly) double velocity;
310 
314 @property (nonatomic, strong, readonly) NSDate *timestamp;
315 
319 @property (nonatomic, assign, readonly) double verticalAccuracy;
320 
321 #pragma mark -
322 #pragma mark methods
323 
324 
325 @end
#define AGS_EXTERN
Definition: AGSDefines.h:28
NSString *AGSLocationSourcePropertyKey NS_TYPED_EXTENSIBLE_ENUM
Used to represent some well-known constant strings for keys in AGSLocation::additionalSourcePropertie...
Definition: AGSLocation.h:30
AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeySatelliteCount
Definition: AGSLocation.h:60
AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyFloor
Definition: AGSLocation.h:46
AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyPositionSource
Definition: AGSLocation.h:54
Represents a location update provided by a location datasource.
Definition: AGSLocation.h:73
BOOL lastKnown
Definition: AGSLocation.h:299
double verticalAccuracy
Definition: AGSLocation.h:319
double velocity
Definition: AGSLocation.h:309
double course
Definition: AGSLocation.h:288
NSDate * timestamp
Definition: AGSLocation.h:314
AGSPoint * position
Definition: AGSLocation.h:304
double horizontalAccuracy
Definition: AGSLocation.h:294
NSDictionary< AGSLocationSourcePropertyKey, id > * additionalSourceProperties
Definition: AGSLocation.h:281
Definition: AGSObject.h:28
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73