ArcGIS Runtime SDK for iOS: AGSLocationDataSource.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSLocationDataSource.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  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSObject.h>
29 
30 
31 
36 typedef NS_ENUM(NSInteger, AGSLocationDataSourceStatus) {
42 };
43 
44 @class AGSLocation;
46 
56 
57 #pragma mark -
58 #pragma mark initializers
59 
60 
61 #pragma mark -
62 #pragma mark properties
63 
67 @property (nullable, nonatomic, strong, readonly) NSError *error;
68 
72 @property (nullable, nonatomic, weak, readwrite) id<AGSLocationChangeHandlerDelegate> locationChangeHandlerDelegate;
73 
77 @property (nonatomic, assign, readonly) AGSLocationDataSourceStatus status;
78 
79 #pragma mark -
80 #pragma mark methods
81 
86 -(void)startWithCompletion:(nullable void(^)(NSError *__nullable error))completion;
87 
91 -(void)stopWithCompletion:(nullable void(^)(void))completion;
92 
93 @end
94 
102 
107 -(void)doStart;
108 
113 -(void)doStop;
114 
118 -(void)didStartOrFailWithError:(nullable NSError*)error;
119 
123 -(void)didStop;
124 
128 -(void)didUpdateHeading:(double)heading;
129 
133 -(void)didUpdateLocation:(AGSLocation*)location;
134 
135 @end
136 
137 #pragma mark -
138 #pragma mark Deprecated
139 
141 
146 @property (nonatomic, assign, readonly) BOOL started ;
147 
152 -(void)stop ;
153 
154 @end
155 
156 #pragma mark -
157 #pragma mark Location Change Handler Delegate Methods
158 #pragma mark -
159 
174 @optional
175 
181 - (void)locationDataSource:(AGSLocationDataSource *)locationDataSource
182  locationDidChange:(AGSLocation *)location;
183 
189 - (void)locationDataSource:(AGSLocationDataSource *)locationDataSource
190  headingDidChange:(double)heading;
191 
197 - (void)locationDataSource:(AGSLocationDataSource *)locationDataSource
198  statusDidChange:(AGSLocationDataSourceStatus)status;
199 
200 @end
201 
202 
AGSLocationDataSourceStatus
Definition: AGSLocationDataSource.h:36
@ AGSLocationDataSourceStatusStarting
Definition: AGSLocationDataSource.h:38
@ AGSLocationDataSourceStatusStarted
Definition: AGSLocationDataSource.h:39
@ AGSLocationDataSourceStatusStopping
Definition: AGSLocationDataSource.h:40
@ AGSLocationDataSourceStatusStopped
Definition: AGSLocationDataSource.h:37
@ AGSLocationDataSourceStatusFailedToStart
Definition: AGSLocationDataSource.h:41
Definition: AGSLocationDataSource.h:140
BOOL started
Definition: AGSLocationDataSource.h:146
A category to organize subclassable aspects of AGSLocationDataSource.
Definition: AGSLocationDataSource.h:101
An abstract base class that provides location updates to AGSLocationDisplay.
Definition: AGSLocationDataSource.h:56
AGSLocationDataSourceStatus status
Definition: AGSLocationDataSource.h:77
NSError * error
Definition: AGSLocationDataSource.h:67
id< AGSLocationChangeHandlerDelegate > locationChangeHandlerDelegate
Definition: AGSLocationDataSource.h:72
Represents a location update provided by a location datasource.
Definition: AGSLocation.h:106
Definition: AGSObject.h:28
A change handler delegate for AGSLocationDataSource.
Definition: AGSLocationDataSource.h:173