ArcGIS Runtime SDK for iOS: AGSRouteTracker.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSRouteTracker.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 #import <ArcGIS/AGSUnitSystem.h>
30 #import <ArcGIS/AGSCancelable.h>
31 
32 
33 
39 typedef NS_ENUM(NSInteger, AGSReroutingStrategy) {
43 };
44 
45 @class AGSLocation;
46 @class AGSRouteParameters;
47 @class AGSRouteResult;
48 @class AGSRouteTask;
49 @class AGSTrackingStatus;
50 @class AGSVoiceGuidance;
52 
53 @protocol AGSRouteTrackerDelegate;
54 
71 
72 #pragma mark -
73 #pragma mark initializers
74 
75 
76 
85 - (nullable instancetype)initWithRouteResult:(AGSRouteResult *)routeResult
86  routeIndex:(NSInteger)routeIndex
87  skipCoincidentStops:(BOOL)skipCoincidentStops;
88 
98 + (nullable instancetype)routeTrackerWithRouteResult:(AGSRouteResult *)routeResult
99  routeIndex:(NSInteger)routeIndex
100  skipCoincidentStops:(BOOL)skipCoincidentStops;
101 
102 #pragma mark -
103 #pragma mark properties
104 
109 @property (nullable, nonatomic, weak, readwrite) id<AGSRouteTrackerDelegate> delegate;
110 
115 @property (nonatomic, assign, readonly, getter=isReroutingEnabled) BOOL reroutingEnabled;
116 
122 @property (nonatomic, assign, readonly) BOOL skipCoincidentStops;
123 
128 @property (nullable, nonatomic, strong, readonly) AGSTrackingStatus *trackingStatus;
129 
134 @property (nonatomic, assign, readwrite) AGSUnitSystem voiceGuidanceUnitSystem;
135 
136 #pragma mark -
137 #pragma mark methods
138 
143 -(void)cancelRerouting;
144 
150 -(void)disableRerouting;
151 
160 
174 -(id<AGSCancelable>)switchToNextDestinationWithCompletion:(nullable void(^)(NSError * __nullable error))completion;
175 
189 -(id<AGSCancelable>)trackLocation:(AGSLocation *)location
190  completion:(nullable void(^)(NSError * __nullable error))completion;
191 
203 - (id<AGSCancelable>)enableReroutingWithParameters:(AGSReroutingParameters *)parameters
204  completion:(void(^)(NSError * __nullable error))completion;
205 
206 @end
207 
213 
214 @optional
215 
223 -(void)routeTracker:(AGSRouteTracker*)routeTracker
224 didGenerateNewVoiceGuidance:(AGSVoiceGuidance*)voiceGuidance;
225 
232 -(void)routeTrackerRerouteDidStart:(AGSRouteTracker*)routeTracker;
233 
242 -(void)routeTracker:(AGSRouteTracker*)routeTracker
243 rerouteDidCompleteWithTrackingStatus:(nullable AGSTrackingStatus*)trackingStatus
244  error:(nullable NSError*)error;
245 
253 -(void)routeTracker:(AGSRouteTracker*)routeTracker
254 didUpdateTrackingStatus:(AGSTrackingStatus*)trackingStatus;
255 
263 -(BOOL)readyStatusOfSpeechEngineForRouteTracker:(AGSRouteTracker *)routeTracker;
264 
265 @end
266 
268 
279 - (nullable instancetype)initWithRouteResult:(AGSRouteResult *)routeResult
280  routeIndex:(NSInteger)routeIndex ;
281 
292 + (nullable instancetype)routeTrackerWithRouteResult:(AGSRouteResult *)routeResult
293  routeIndex:(NSInteger)routeIndex ;
294 
311 -(id<AGSCancelable>)enableReroutingWithRouteTask:(AGSRouteTask *)routeTask
312  routeParameters:(AGSRouteParameters *)routeParameters
313  strategy:(AGSReroutingStrategy)strategy
314  visitFirstStopOnStart:(BOOL)visitFirstStopOnStart
315  completion:(void(^)(NSError * __nullable error))completion ;
316 
317 @end
318 
319 
AGSReroutingStrategy
Definition: AGSRouteTracker.h:39
@ AGSReroutingStrategyToNextStop
Definition: AGSRouteTracker.h:41
@ AGSReroutingStrategyToNextWaypoint
Definition: AGSRouteTracker.h:40
@ AGSReroutingStrategyResequenceStopsOnly
Definition: AGSRouteTracker.h:42
AGSUnitSystem
Definition: AGSUnitSystem.h:35
Definition: AGSRouteTracker.h:267
Represents a location update provided by a location datasource.
Definition: AGSLocation.h:106
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:49
Uses a location to provide status and progress updates as a route is traversed (by a moving vehicle,...
Definition: AGSRouteTracker.h:71
AGSTrackingStatus * trackingStatus
Definition: AGSRouteTracker.h:128
id< AGSRouteTrackerDelegate > delegate
Definition: AGSRouteTracker.h:109
nullable AGSVoiceGuidance * generateVoiceGuidance()
AGSUnitSystem voiceGuidanceUnitSystem
Definition: AGSRouteTracker.h:134
BOOL reroutingEnabled
Definition: AGSRouteTracker.h:115
BOOL skipCoincidentStops
Definition: AGSRouteTracker.h:122
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:212