ArcGIS Runtime SDK for iOS: AGSRouteTracker.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSRouteTracker.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  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSObject.h>
29 #import <ArcGIS/AGSUnitSystem.h>
30 
31 
32 
38 typedef NS_ENUM(NSInteger, AGSReroutingStrategy) {
42 };
43 
44 @class AGSLocation;
45 @class AGSRouteParameters;
46 @class AGSRouteResult;
47 @class AGSRouteTask;
48 @class AGSTrackingStatus;
49 @class AGSVoiceGuidance;
51 
53 
70 
71 #pragma mark -
72 #pragma mark initializers
73 
74 
75 
84 - (nullable instancetype)initWithRouteResult:(AGSRouteResult *)routeResult
85  routeIndex:(NSInteger)routeIndex
86  skipCoincidentStops:(BOOL)skipCoincidentStops;
87 
97 + (nullable instancetype)routeTrackerWithRouteResult:(AGSRouteResult *)routeResult
98  routeIndex:(NSInteger)routeIndex
99  skipCoincidentStops:(BOOL)skipCoincidentStops;
100 
101 #pragma mark -
102 #pragma mark properties
103 
108 @property (nullable, nonatomic, weak, readwrite) id<AGSRouteTrackerDelegate> delegate;
109 
114 @property (nonatomic, assign, readonly, getter=isReroutingEnabled) BOOL reroutingEnabled;
115 
121 @property (nonatomic, assign, readonly) BOOL skipCoincidentStops;
122 
127 @property (nullable, nonatomic, strong, readonly) AGSTrackingStatus *trackingStatus;
128 
133 @property (nonatomic, assign, readwrite) AGSUnitSystem voiceGuidanceUnitSystem;
134 
135 #pragma mark -
136 #pragma mark methods
137 
142 -(void)cancelRerouting;
143 
149 -(void)disableRerouting;
150 
159 
173 -(id<AGSCancelable>)switchToNextDestinationWithCompletion:(nullable void(^)(NSError * __nullable error))completion;
174 
188 -(id<AGSCancelable>)trackLocation:(AGSLocation *)location
189  completion:(nullable void(^)(NSError * __nullable error))completion;
190 
202 - (id<AGSCancelable>)enableReroutingWithParameters:(AGSReroutingParameters *)parameters
203  completion:(void(^)(NSError * __nullable error))completion;
204 
205 @end
206 
212 
213 @optional
214 
222 -(void)routeTracker:(AGSRouteTracker*)routeTracker
223 didGenerateNewVoiceGuidance:(AGSVoiceGuidance*)voiceGuidance;
224 
231 -(void)routeTrackerRerouteDidStart:(AGSRouteTracker*)routeTracker;
232 
241 -(void)routeTracker:(AGSRouteTracker*)routeTracker
242 rerouteDidCompleteWithTrackingStatus:(nullable AGSTrackingStatus*)trackingStatus
243  error:(nullable NSError*)error;
244 
252 -(void)routeTracker:(AGSRouteTracker*)routeTracker
253 didUpdateTrackingStatus:(AGSTrackingStatus*)trackingStatus;
254 
255 @end
256 
258 
269 - (nullable instancetype)initWithRouteResult:(AGSRouteResult *)routeResult
270  routeIndex:(NSInteger)routeIndex ;
271 
282 + (nullable instancetype)routeTrackerWithRouteResult:(AGSRouteResult *)routeResult
283  routeIndex:(NSInteger)routeIndex ;
284 
301 -(id<AGSCancelable>)enableReroutingWithRouteTask:(AGSRouteTask *)routeTask
302  routeParameters:(AGSRouteParameters *)routeParameters
303  strategy:(AGSReroutingStrategy)strategy
304  visitFirstStopOnStart:(BOOL)visitFirstStopOnStart
305  completion:(void(^)(NSError * __nullable error))completion ;
306 
307 @end
308 
309 
AGSReroutingStrategy
Definition: AGSRouteTracker.h:38
@ AGSReroutingStrategyToNextStop
Definition: AGSRouteTracker.h:40
@ AGSReroutingStrategyToNextWaypoint
Definition: AGSRouteTracker.h:39
@ AGSReroutingStrategyResequenceStopsOnly
Definition: AGSRouteTracker.h:41
AGSUnitSystem
Definition: AGSUnitSystem.h:35
Definition: AGSRouteTracker.h:257
Represents a location update provided by a location datasource.
Definition: AGSLocation.h:73
Definition: AGSObject.h:28
Represents the parameters that are used to perform automatic re-routing if off-route while navigating...
Definition: AGSReroutingParameters.h:50
Input parameters for AGSRouteTask.
Definition: AGSRouteParameters.h:49
Result returned by AGSRouteTask.
Definition: AGSRouteResult.h:43
A task to compute routes and turn-by-turn directions.
Definition: AGSRouteTask.h:50
Uses a location to provide status and progress updates as a route is traversed (by a moving vehicle,...
Definition: AGSRouteTracker.h:70
AGSTrackingStatus * trackingStatus
Definition: AGSRouteTracker.h:127
id< AGSRouteTrackerDelegate > delegate
Definition: AGSRouteTracker.h:108
nullable AGSVoiceGuidance * generateVoiceGuidance()
AGSUnitSystem voiceGuidanceUnitSystem
Definition: AGSRouteTracker.h:133
BOOL reroutingEnabled
Definition: AGSRouteTracker.h:114
BOOL skipCoincidentStops
Definition: AGSRouteTracker.h:121
Defines route tracking current status data.
Definition: AGSTrackingStatus.h:54
Direction guidance text reformatted for speech.
Definition: AGSVoiceGuidance.h:48
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:38
Definition: AGSRouteTracker.h:211