ArcGIS Runtime SDK for iOS: AGSLocation.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSLocation.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 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 typedef NSString *AGSPositioningSource NS_TYPED_ENUM;
40 
41 
48 AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyFloor;
49 
56 AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyPositionSource;
57 
62 AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeySatelliteCount;
63 
68 AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyTransmitterCount;
69 
73 AGS_EXTERN AGSPositioningSource const AGSPositioningSourceGNSS;
74 
78 AGS_EXTERN AGSPositioningSource const AGSPositioningSourceWIFI;
79 
83 AGS_EXTERN AGSPositioningSource const AGSPositioningSourceCELL;
84 
88 AGS_EXTERN AGSPositioningSource const AGSPositioningSourceBLE;
89 
93 AGS_EXTERN AGSPositioningSource const AGSPositioningSourceAppleIPS;
94 
105 @interface AGSLocation : AGSObject
106 
107 #pragma mark -
108 #pragma mark initializers
109 
110 
111 
122 -(instancetype)initWithPosition:(AGSPoint*)position horizontalAccuracy:(double)horizontalAccuracy velocity:(double)velocity course:(double)course lastKnown:(BOOL)lastKnown;
123 
136 -(instancetype)initWithPosition:(AGSPoint*)position
137  timestamp:(NSDate*)timestamp
138  horizontalAccuracy:(double)horizontalAccuracy
139  verticalAccuracy:(double)verticalAccuracy
140  velocity:(double)velocity
141  course:(double)course
142  lastKnown:(BOOL)lastKnown;
143 
181 - (instancetype)initWithPosition:(AGSPoint *)position
182  timestamp:(nullable NSDate *)timestamp
183  horizontalAccuracy:(double)horizontalAccuracy
184  verticalAccuracy:(double)verticalAccuracy
185  velocity:(double)velocity
186  course:(double)course
187  lastKnown:(BOOL)lastKnown
188  additionalSourceProperties:(NSDictionary<AGSLocationSourcePropertyKey, id> *)additionalSourceProperties;
189 
200 +(instancetype)locationWithPosition:(AGSPoint*)position horizontalAccuracy:(double)horizontalAccuracy velocity:(double)velocity course:(double)course lastKnown:(BOOL)lastKnown;
201 
216 +(instancetype)locationWithPosition:(AGSPoint*)position
217  timestamp:(NSDate*)timestamp
218  horizontalAccuracy:(double)horizontalAccuracy
219  verticalAccuracy:(double)verticalAccuracy
220  velocity:(double)velocity
221  course:(double)course
222  lastKnown:(BOOL)lastKnown;
223 
263 + (instancetype)locationWithPosition:(AGSPoint *)position
264  timestamp:(nullable NSDate *)timestamp
265  horizontalAccuracy:(double)horizontalAccuracy
266  verticalAccuracy:(double)verticalAccuracy
267  velocity:(double)velocity
268  course:(double)course
269  lastKnown:(BOOL)lastKnown
270  additionalSourceProperties:(NSDictionary<AGSLocationSourcePropertyKey, id> *)additionalSourceProperties;
271 
279 +(AGSLocation*)locationWithCLLocation:(CLLocation*)cllocation;
280 
281 #pragma mark -
282 #pragma mark properties
283 
320 @property (nonatomic, copy, readonly) NSDictionary<AGSLocationSourcePropertyKey, id> *additionalSourceProperties;
321 
327 @property (nonatomic, assign, readonly) double course;
328 
333 @property (nonatomic, assign, readonly) double horizontalAccuracy;
334 
338 @property (nonatomic, assign, readonly) BOOL lastKnown;
339 
343 @property (nullable, nonatomic, strong, readonly) AGSPoint *position;
344 
348 @property (nonatomic, assign, readonly) double velocity;
349 
353 @property (nonatomic, strong, readonly) NSDate *timestamp;
354 
358 @property (nonatomic, assign, readonly) double verticalAccuracy;
359 
360 #pragma mark -
361 #pragma mark methods
362 
363 
364 @end
#define AGS_EXTERN
Definition: AGSDefines.h:28
AGS_EXTERN AGSPositioningSource const AGSPositioningSourceAppleIPS
Definition: AGSLocation.h:93
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 AGSPositioningSource const AGSPositioningSourceWIFI
Definition: AGSLocation.h:78
NSString *AGSPositioningSource NS_TYPED_ENUM
Definition: AGSLocation.h:39
AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyTransmitterCount
Definition: AGSLocation.h:68
AGS_EXTERN AGSPositioningSource const AGSPositioningSourceGNSS
Definition: AGSLocation.h:73
AGS_EXTERN AGSPositioningSource const AGSPositioningSourceBLE
Definition: AGSLocation.h:88
AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeySatelliteCount
Definition: AGSLocation.h:62
AGS_EXTERN AGSPositioningSource const AGSPositioningSourceCELL
Definition: AGSLocation.h:83
AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyFloor
Definition: AGSLocation.h:48
AGS_EXTERN AGSLocationSourcePropertyKey const AGSLocationSourcePropertyKeyPositionSource
Definition: AGSLocation.h:56
Represents a location update provided by a location datasource.
Definition: AGSLocation.h:106
BOOL lastKnown
Definition: AGSLocation.h:338
double verticalAccuracy
Definition: AGSLocation.h:358
double velocity
Definition: AGSLocation.h:348
double course
Definition: AGSLocation.h:327
NSDate * timestamp
Definition: AGSLocation.h:353
AGSPoint * position
Definition: AGSLocation.h:343
double horizontalAccuracy
Definition: AGSLocation.h:333
NSDictionary< AGSLocationSourcePropertyKey, id > * additionalSourceProperties
Definition: AGSLocation.h:320
Definition: AGSObject.h:28
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73