高德地图SDK(导航) V11.2.0501

Loading...
Searching...
No Matches
AMapNaviDriveManager.h
Go to the documentation of this file.
1//
2// AMapNaviDriveManager.h
3// AMapNaviKit
4//
5// Created by 刘博 on 16/1/12.
6// Copyright © 2016年 Amap. All rights reserved.
7//
8
9#import "AMapNaviBaseManager.h"
10#import "AMapNaviDriveDataRepresentable.h"
11#import "AMapNaviRoute.h"
12
13NS_ASSUME_NONNULL_BEGIN
14
15@protocol AMapNaviDriveManagerDelegate;
16
17#pragma mark - AMapNaviDriveManager
18
21@interface AMapNaviDriveManager : AMapNaviBaseManager
22
23#pragma mark - Singleton
24
31+ (AMapNaviDriveManager *)sharedInstance;
32
39+ (BOOL)destroyInstance;
40
45- (instancetype)init __attribute__((unavailable("Since 5.4.0, init has been deprecated, please use the singleton [AMapNaviDriveManager sharedInstance] instead. And call [AMapNaviDriveManager destroyInstance] to destroy the singleton when calling the dealloc function of the class or at other appropriate times (such as when the navigation ViewController is popped). (Note: If the destruction fails, check if the singleton is strongly referenced)")));
46
47#pragma mark - Delegate
48
51@property (nonatomic, weak) id<AMapNaviDriveManagerDelegate> delegate;
52
53#pragma mark - Event Listener
54
61- (void)addEventListener:(id<AMapNaviDriveManagerDelegate>)aListener;
62
69- (void)removeEventListener:(id<AMapNaviDriveManagerDelegate>)aListener;
70
71#pragma mark - Data Representative
72
79- (void)addDataRepresentative:(id<AMapNaviDriveDataRepresentable>)aRepresentative;
80
87- (void)removeDataRepresentative:(id<AMapNaviDriveDataRepresentable>)aRepresentative;
88
89#pragma mark - 轨迹还原
90/*
91 Designated latitude and longitude of navigation endpoint
92 wayPoints - 途经点经纬度，同时支持最多16个途经点的路径规划；
93 Longitude and latitude of waypoints, supporting path planning for up to 16 waypoints simultaneously;
94 TracePoints- 轨迹点经纬度，推荐使用高德算路结果中的经纬度点，最多40000个
95 The latitude and longitude of the trajectory points are recommended to use the latitude and longitude points in the Gaode calculation results, with a maximum of 40000 points
96 vehicleType 0：燃油客车（默认值），1：燃油货车，2：纯电动客车（新能源标签默认值），3：纯电动货车，4：插电式混动客车，5：插电式混动货车，6：油车特种车辆，7：纯电动特种车辆，8：混动特种车辆，11：摩托车（油），12：摩托车（电），13：摩托车（混），17：柴油货车，18：施工作业车（定位合
97 0: Fuel powered buses (default value), 1: Fuel powered trucks, 2: Pure electric buses (default value for new energy labels), 3: Pure electric trucks, 4: Plug in hybrid buses, 5: Plug in hybrid trucks, 6: Fuel powered special vehicles, 7: Pure electric special vehicles, 8: Hybrid special vehicles, 11: Motorcycles (gasoline), 12: Motorcycles (electric), 13: Motorcycles (hybrid), 17: Diesel trucks, 18: Construction work vehicles (positioning combined)
98*/
99+ (void)pushTrajectoryRestoration:(NSArray<AMapNaviPoint *> *)wayPoints tracePoints:(NSArray<AMapNaviPoint *> *)tracePoints vehicleType:(NSInteger)vehicleType drivingStrategy:(AMapNaviDrivingStrategy)drivingStrategy resultCallback:(void(^)(BOOL isLoadSuc))resultCallback;
100
101#pragma mark - Navi Route
102
105@property (nonatomic, readonly) NSInteger naviRouteID;
106
109@property (nonatomic, readonly, nullable) AMapNaviRoute *naviRoute;
110
113@property (nonatomic, readonly, nullable) NSArray<NSNumber *> *naviRouteIDs;
114
117@property (nonatomic, readonly, nullable) NSDictionary<NSNumber *, AMapNaviRoute *> *naviRoutes;
118
127- (BOOL)selectNaviRouteWithRouteID:(NSInteger)routeID;
128
135- (void)switchParallelRoad:(AMapNaviParallelRoadInfo *)parallelRoadInfo;
136
143- (void)setMultipleRouteNaviMode:(BOOL)multipleRouteNaviMode;
144
151- (void)setTruckMultipleRouteNaviMode:(BOOL)multipleRouteNaviMode;
152
153#pragma mark - Options
154
159@property (nonatomic, assign) BOOL updateCameraInfo __attribute__((deprecated("Deprecated, since 10.0.820")));
160
163@property (nonatomic, assign) BOOL updateTrafficInfo;
164
167@property (nonatomic, assign) AMapNaviDetectedMode detectedMode;
168
171@property (nonatomic, assign, readonly) AMapNaviGPSSignalStrength gpsSignalStrength;
172
175@property (nonatomic, assign) NSUInteger gpsWeakDetecedInterval __attribute__((deprecated("Deprecated, since 7.8.0")));
176
179- (void)setIsOpenTrafficLight:(NSString *)key;
180
181#pragma mark - Calculate Route
182
183// 以下算路方法需要高德坐标(GCJ02)
184//The following routing methods require AutoNavi coordinates(GCJ02)
185
198- (BOOL)calculateDriveRouteWithEndPoints:(NSArray<AMapNaviPoint *> *)endPoints
199 wayPoints:(nullable NSArray<AMapNaviPoint *> *)wayPoints
200 drivingStrategy:(AMapNaviDrivingStrategy)strategy;
201
216- (BOOL)calculateDriveRouteWithStartPoints:(NSArray<AMapNaviPoint *> *)startPoints
217 endPoints:(NSArray<AMapNaviPoint *> *)endPoints
218 wayPoints:(nullable NSArray<AMapNaviPoint *> *)wayPoints
219 drivingStrategy:(AMapNaviDrivingStrategy)strategy;
220
240- (BOOL)calculateDriveRouteWithStartPOIInfos:(NSArray<AMapNaviPOIInfo *> *)startPOIInfos
241 endPOIInfos:(NSArray<AMapNaviPOIInfo *> *)endPOIInfos
242 wayPOIInfos:(nullable NSArray<AMapNaviPOIInfo *> *)wayPOIInfos
243 drivingStrategy:(AMapNaviDrivingStrategy)strategy;
244
245
260- (BOOL)calculateDriveRouteWithStartPointPOIId:(nullable NSString *)startPOIId
261 endPointPOIId:(nonnull NSString *)endPOIId
262 wayPointsPOIId:(nullable NSArray<NSString *> *)wayPOIIds
263 drivingStrategy:(AMapNaviDrivingStrategy)strategy;
278- (BOOL)calculateDriveRouteWithStartPOIInfo:(nullable AMapNaviPOIInfo *)startPOIInfo
279 endPOIInfo:(nonnull AMapNaviPOIInfo *)endPOIInfo
280 wayPOIInfos:(nullable NSArray<AMapNaviPOIInfo *> *)wayPOIInfos
281 drivingStrategy:(AMapNaviDrivingStrategy)strategy;
282
283
298- (BOOL)calculateDriveRouteWithStartPOIInfo:(nullable AMapNaviPOIInfo *)startPOIInfo
299 endPOIInfo:(nonnull AMapNaviPOIInfo *)endPOIInfo
300 wayPOIInfos:(nullable NSArray<AMapNaviPOIInfo *> *)wayPOIInfos
301 calRouteOptions:(nullable AMapNaviCalRouteOptions *)options;
302
319- (BOOL)calculateDriveRouteWithStartPOIInfo:(nullable AMapNaviPOIInfo *)startPOIInfo
320 endPOIInfo:(nonnull AMapNaviPOIInfo *)endPOIInfo
321 wayPOIInfos:(nullable NSArray<AMapNaviPOIInfo *> *)wayPOIInfos
322 drivingStrategy:(AMapNaviDrivingStrategy)strategy
323 callback:(nullable void (^)(AMapNaviCalculateRouteResult *_Nullable routeResult))callback;
324
342- (BOOL)independentCalculateDriveRouteWithStartPOIInfo:(nullable AMapNaviPOIInfo *)startPOIInfo
343 endPOIInfo:(nonnull AMapNaviPOIInfo *)endPOIInfo
344 wayPOIInfos:(nullable NSArray<AMapNaviPOIInfo *> *)wayPOIInfos
345 drivingStrategy:(AMapNaviDrivingStrategy)strategy
346 callback:(nullable void (^)(AMapNaviRouteGroup *_Nullable routeGroup, NSError *_Nullable error))callback;
347
348
365- (BOOL)independentCalculateDriveRouteWithStartPOIInfo:(nullable AMapNaviPOIInfo *)startPOIInfo
366 endPOIInfo:(nonnull AMapNaviPOIInfo *)endPOIInfo
367 wayPOIInfos:(nullable NSArray<AMapNaviPOIInfo *> *)wayPOIInfos
368 calRouteOptions:(nullable AMapNaviCalRouteOptions *)options
369 callback:(nullable void (^)(AMapNaviRouteGroup *_Nullable routeGroup, NSError *_Nullable error))callback;
370
371
380- (BOOL)recalculateDriveRouteWithDrivingStrategy:(AMapNaviDrivingStrategy)strategy;
381
392- (BOOL)recalculateDriveRouteWithDrivingStrategy:(AMapNaviDrivingStrategy)strategy callback:(nullable void (^)(AMapNaviCalculateRouteResult *_Nullable routeResult))callback;
393
394#pragma mark - Manual
395
404- (void)setVehicleProvince:(NSString *)province number:(NSString *)number __attribute__((deprecated("Deprecated, please use setVehicleInfo: instead, since 6.0.0")));
405
414- (BOOL)setVehicleInfo:(nullable AMapNaviVehicleInfo *)vehicleInfo;
415
424- (BOOL)setBroadcastMode:(AMapNaviBroadcastMode)mode;
425
434- (BOOL)setOnlineCarHailingType:(AMapNaviOnlineCarHailingType)type;
435
436#pragma mark - Traffic Status
437
448- (nullable NSArray<AMapNaviTrafficStatus *> *)getTrafficStatusesWithStartPosition:(int)startPosition distance:(int)distance;
449
456- (nullable NSArray<AMapNaviTrafficStatus *> *)getTrafficStatuses;
457
458#pragma mark - Xcode Simulate Location
459
466- (void)setXcodeSimulateLocationEnable:(BOOL)enableNavi __attribute__((deprecated("Deprecated, since 7.5.0")));
467
468#pragma mark - 服务区详情信息 Service area details
477- (void)setServiceAreaDetailsEnable:(BOOL)enable;
478
479#pragma mark - push路线相关 push route related
480
495- (BOOL)pushDriveRouteWithRouteGuideData:(nonnull NSData *)routeData
496 startPOIInfo:(nonnull AMapNaviPOIInfo *)startPOIInfo
497 endPOIInfo:(nonnull AMapNaviPOIInfo *)endPOIInfo
498 wayPOIInfos:(nullable NSArray<AMapNaviPOIInfo *> *)wayPOIInfos
499 drivingStrategy:(AMapNaviDrivingStrategy)strategy;
500
501// 5.1 算路协议升级后的路线还原接口 routeguide 协议版本号 since 9.0.0
502// 5.1 Route restoration interface after route calculation protocol upgrade routeguide protocol version number
509- (NSString *_Nullable)getPushDataNaviVersion;
510
517- (NSString *_Nullable)routeSDKVersion;
518
525- (NSString *_Nullable)routeServerVersion;
526@end
527
528#pragma mark - Escort
529
530@interface AMapNaviDriveManager (Escort)
531
541- (BOOL)setEscortMissonID:(NSNumber *)missonID;
542
543@end
544
545#pragma mark - Private
546
547@interface AMapNaviDriveManager (Private)
552+ (BOOL)setCustomCloudControlEnable:(BOOL)enable;
557- (BOOL)setExtenalCloudControl:(nullable NSString *)cloudControlString;
558
614- (BOOL)getRestrictareaInfoInRoute:(AMapNaviRoute *)route callback:(nonnull void (^)(BOOL responseSuccess, NSString *responseData, NSString *errorDesc))callback;
615
616@end
617
618#pragma mark - AMapNaviDriveManagerDelegate
619@protocol AMapNaviDriveManagerDelegate <NSObject>
620@optional
629- (void)driveManager:(AMapNaviDriveManager *)driveManager error:(NSError *)error;
630
637- (void)driveManagerOnCalculateRouteSuccess:(AMapNaviDriveManager *)driveManager;
638
647- (void)driveManager:(AMapNaviDriveManager *)driveManager onCalculateRouteSuccessWithType:(AMapNaviRoutePlanType)type;
648
659- (void)driveManager:(AMapNaviDriveManager *)driveManager onCalculateRouteSuccessWithType:(AMapNaviRoutePlanType)type calculateRouteResult:(AMapNaviCalculateRouteResult *)calculateRouteResult;
660
669- (void)driveManager:(AMapNaviDriveManager *)driveManager onCalculateRouteFailure:(NSError *)error;
670
681- (void)driveManager:(AMapNaviDriveManager *)driveManager onCalculateRouteFailure:(NSError *)error routePlanType:(AMapNaviRoutePlanType)type;
682
695- (void)driveManager:(AMapNaviDriveManager *)driveManager onCalculateRouteFailure:(NSError *)error routePlanType:(AMapNaviRoutePlanType)type calculateRouteResult:(AMapNaviCalculateRouteResult *)calculateRouteResult;
696
705- (void)driveManager:(AMapNaviDriveManager *)driveManager didStartNavi:(AMapNaviMode)naviMode;
706
712- (void)driveManager:(AMapNaviDriveManager *)driveManager didStopNavi:(BOOL)isStopped;
713
720- (void)driveManagerNeedRecalculateRouteForYaw:(AMapNaviDriveManager *)driveManager;
721
728- (void)driveManagerNeedRecalculateRouteForTrafficJam:(AMapNaviDriveManager *)driveManager;
729
738- (void)driveManager:(AMapNaviDriveManager *)driveManager onArrivedWayPoint:(int)wayPointIndex;
739
748- (BOOL)driveManagerIsNaviSoundPlaying:(AMapNaviDriveManager *)driveManager;
749
760- (void)driveManager:(AMapNaviDriveManager *)driveManager playNaviSoundString:(NSString *)soundString soundStringType:(AMapNaviSoundType)soundStringType;
761
768- (void)driveManagerDidEndEmulatorNavi:(AMapNaviDriveManager *)driveManager;
769
776- (void)driveManagerOnArrivedDestination:(AMapNaviDriveManager *)driveManager;
777
786- (void)driveManager:(AMapNaviDriveManager *)driveManager onNaviPlayRing:(AMapNaviRingType)ringType;
787
796- (void)driveManager:(AMapNaviDriveManager *)driveManager updateGPSSignalStrength:(AMapNaviGPSSignalStrength)gpsSignalStrength;
797
806- (void)driveManager:(AMapNaviDriveManager *)driveManager postRouteNotification:(AMapNaviRouteNotifyData *)notifyData;
807
816- (void)driveManager:(AMapNaviDriveManager *)driveManager onSuggestChangeMainNaviRoute:(AMapNaviSuggestChangeMainNaviRouteInfo *)suggestChangeMainNaviRouteInfo;
817
826- (void)driveManager:(AMapNaviDriveManager *_Nullable)manager onUpdateDriveComfort:(AMapNaviDriveComfort *_Nonnull)driveComfort;
827
838- (void)driveManager:(AMapNaviDriveManager *_Nullable)manager onUpdateDriveEvent:(AMapNaviDriveEvent *_Nonnull)driveEvent;
839
850- (void)driveManager:(AMapNaviDriveManager *_Nullable)manager onUpdateNaviSpeedLimitSection:(NSInteger)speed;
851
860- (void)driveManager:(AMapNaviDriveManager *)driveManager onStartPlayPCMData:(nonnull AMapNaviPCMTask *)playTask;
861
870- (void)driveManager:(AMapNaviDriveManager *)driveManager onPlayPCMData:(nonnull AMapNaviPCMTask *)playTask;
871
880- (void)driveManager:(AMapNaviDriveManager *)driveManager onPCMDataFinished:(nonnull AMapNaviPCMTask *)playTask;
881
882@end
883
884NS_ASSUME_NONNULL_END
AMapNaviBaseManager.h
AMapNaviBroadcastMode
AMapNaviBroadcastMode
Definition AMapNaviCommonObj.h:282
AMapNaviGPSSignalStrength
AMapNaviGPSSignalStrength
Definition AMapNaviCommonObj.h:351
AMapNaviOnlineCarHailingType
AMapNaviOnlineCarHailingType
Definition AMapNaviCommonObj.h:462
AMapNaviRoutePlanType
AMapNaviRoutePlanType
Definition AMapNaviCommonObj.h:369
AMapNaviMode
AMapNaviMode
Definition AMapNaviCommonObj.h:38
AMapNaviDrivingStrategy
AMapNaviDrivingStrategy
Definition AMapNaviCommonObj.h:72
AMapNaviDetectedMode
AMapNaviDetectedMode
Definition AMapNaviCommonObj.h:212
AMapNaviRingType
AMapNaviRingType
Definition AMapNaviCommonObj.h:339
AMapNaviSoundType
AMapNaviSoundType
Definition AMapNaviCommonObj.h:201
AMapNaviDriveDataRepresentable.h
AMapNaviRoute.h
AMapNaviBaseManager
Definition AMapNaviBaseManager.h:25
AMapNaviCalRouteOptions
Definition AMapNaviCommonObj.h:1853
AMapNaviCalculateRouteResult
Definition AMapNaviRoute.h:325
AMapNaviDriveComfort
Definition AMapNaviCommonObj.h:1431
AMapNaviDriveEvent
Definition AMapNaviCommonObj.h:1467
AMapNaviDriveManager
Definition AMapNaviDriveManager.h:22
AMapNaviDriveManager::updateCameraInfo
BOOL updateCameraInfo
Definition AMapNaviDriveManager.h:159
-[AMapNaviDriveManager routeServerVersion]
NSString *_Nullable routeServerVersion()
获得 routeServer 版本号。 Get the version number of routeServer
+[AMapNaviDriveManager destroyInstance]
BOOL destroyInstance()
销毁AMapNaviDriveManager单例. AMapNaviDriveManager内存开销比较大，建议不使用时可销毁. since 5.4.0 Destroy the AMapNaviDriv...
AMapNaviDriveManager::naviRouteID
NSInteger naviRouteID
Definition AMapNaviDriveManager.h:105
AMapNaviDriveManager::gpsWeakDetecedInterval
NSUInteger gpsWeakDetecedInterval
Definition AMapNaviDriveManager.h:175
+[AMapNaviDriveManager sharedInstance]
AMapNaviDriveManager * sharedInstance()
AMapNaviDriveManager单例。注意：如果已经获取了AMapNaviRideManager、AMapNaviWalkManager单例，需要调用对应的destroyInstance方法销毁...
-[AMapNaviDriveManager init]
instancetype init()
请使用单例替代. since 5.4.0 init已被禁止使用，请使用单例 [AMapNaviDriveManager sharedInstance] 替代，且在调用类的 dealloc 函数或其他适当...
AMapNaviDriveManager::naviRoutes
NSDictionary< NSNumber *, AMapNaviRoute * > * naviRoutes
Definition AMapNaviDriveManager.h:117
-[AMapNaviDriveManager routeSDKVersion]
NSString *_Nullable routeSDKVersion()
获得 routeService 版本号。 Get the version number of routeService
AMapNaviDriveManager::naviRoute
AMapNaviRoute * naviRoute
Definition AMapNaviDriveManager.h:109
AMapNaviDriveManager::updateTrafficInfo
BOOL updateTrafficInfo
Definition AMapNaviDriveManager.h:163
AMapNaviDriveManager::delegate
id< AMapNaviDriveManagerDelegate > delegate
Definition AMapNaviDriveManager.h:51
AMapNaviDriveManager::detectedMode
AMapNaviDetectedMode detectedMode
Definition AMapNaviDriveManager.h:167
-[AMapNaviDriveManager getPushDataNaviVersion]
NSString *_Nullable getPushDataNaviVersion()
获取导航路线还原版本号。since 9.0.0 Get navigation route restoration version number
AMapNaviDriveManager::naviRouteIDs
NSArray< NSNumber * > * naviRouteIDs
Definition AMapNaviDriveManager.h:113
AMapNaviDriveManager::gpsSignalStrength
AMapNaviGPSSignalStrength gpsSignalStrength
Definition AMapNaviDriveManager.h:171
-[AMapNaviDriveManager getTrafficStatuses]
nullable NSArray< AMapNaviTrafficStatus * > * getTrafficStatuses()
获取当前道路的路况光柱信息 Get the traffic light column information of the current road
AMapNaviPCMTask
Definition AMapNaviCommonObj.h:1583
AMapNaviPOIInfo
Definition AMapNaviCommonObj.h:1326
AMapNaviParallelRoadInfo
Definition AMapNaviCommonObj.h:1350
AMapNaviPoint
Definition AMapNaviCommonObj.h:614
AMapNaviRouteGroup
Definition AMapNaviRoute.h:335
AMapNaviRoute
Definition AMapNaviRoute.h:186
AMapNaviRouteNotifyData
Definition AMapNaviCommonObj.h:1190
AMapNaviSuggestChangeMainNaviRouteInfo
Definition AMapNaviCommonObj.h:1270
AMapNaviTrafficStatus
前方交通路况信息类 Traffic condition information class ahead
Definition AMapNaviCommonObj.h:722
AMapNaviVehicleInfo
Definition AMapNaviCommonObj.h:1052
© 2017 高德信息技术有限公司 版权所有，保留所有权利。