高德地图SDK(导航)  V11.1.000
AMapNaviDriveManager Class Reference

#import <AMapNaviDriveManager.h>

Inheritance diagram for AMapNaviDriveManager:
AMapNaviBaseManager

Instance Methods

(instancetype) - init
 请使用单例替代. since 5.4.0 init已被禁止使用,请使用单例 [AMapNaviDriveManager sharedInstance] 替代,且在调用类的 dealloc 函数或其他适当时机(如导航ViewController被pop时),调用 [AMapNaviDriveManager destroyInstance] 来销毁单例(需要注意如未销毁成功,请检查单例是否被强引用) Please use a singleton instead. 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) More...
 
(void) - addEventListener:
 增加用于接收导航回调事件的Listener, 效果等同于delegate. 注意:该方法不会增加实例对象的引用计数(Weak Reference). since 5.4.0 Adds a Listener to receive navigation callback events, functionally equivalent to a delegate. Note: This method does not increment the reference count of the instance object (Weak Reference) More...
 
(void) - removeEventListener:
 移除用于接收导航回调事件的Listener. since 5.4.0 Remove the Listener used to receive navigation callback events More...
 
(void) - addDataRepresentative:
 增加用于展示导航数据的DataRepresentative.注意:该方法不会增加实例对象的引用计数(Weak Reference) Add a DataRepresentative for displaying navigation data. Note: This method will not increase the reference count of the instance object (Weak Reference) More...
 
(void) - removeDataRepresentative:
 移除用于展示导航数据的DataRepresentative Remove the DataRepresentative used to display navigation data More...
 
(BOOL) - selectNaviRouteWithRouteID:
 多路径规划时选择路径.注意:该方法仅限于在开始导航前使用,开始导航后该方法无效. Selecting a route during multi-route planning. Note: This method is only available before starting navigation and becomes invalid after navigation starts More...
 
(void) - switchParallelRoad:
 切换平行道路, 包括主辅路切换、高架上下切换. 该方法需要配合 AMapNaviDriveDataRepresentable 的 driveManager:updateParallelRoadStatus: 回调使用. since 5.3.0 Switch parallel roads, including main/auxiliary road switching and elevated road level switching. This method needs to be used with the driveManager:updateParallelRoadStatus: callback of AMapNaviDriveDataRepresentable More...
 
(void) - setMultipleRouteNaviMode:
 设置多路线导航模式(实时导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式). 注意: 1、设置的导航模式会在下一次主动路径规划时生效, 建议在 AMapNaviDriveManager 单例初始化时就进行设置. 2、多路线导航模式还需同时满足以下4个条件才能够生效:a.路径规划时 AMapNaviDrivingStrategy 需选用多路径策略; b.起终点的直线距离需<=80KM; c.不能有途径点; d.车辆不能是货车类型. since 6.3.0 Set multi-route navigation mode (providing several alternative routes for users to choose from during real-time navigation), or single-route navigation mode (default mode). Note: 1. The set navigation mode will take effect the next time active route planning is initiated. It is recommended to set it during the initialization of the AMapNaviDriveManager singleton. 2. The multi-route navigation mode also needs to meet the following 4 conditions to take effect: a. When planning the route, AMapNaviDrivingStrategy needs to adopt the multi-path strategy; b. The straight-line distance between the start and end points must be <=80KM; c. There should be no waypoints; d. The vehicle type must not be a truck. More...
 
(void) - setTruckMultipleRouteNaviMode:
 设置货车多路线导航模式(导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式)。建议在 AMapNaviDriveManager 单例初始化时就进行设置。注意:此方法仅限于在开始导航前调用有效,以下情况不会出现多备选路线:模拟导航、路线存在途经点、路线长度超过80KM。特别注意:当前接口为收费接口,您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/。since 9.3.5 Set truck multi-route navigation mode (with several alternative routes available for users to choose during navigation), or single-route navigation mode (default mode). It is recommended to set this during the initialization of the AMapNaviDriveManager singleton. Note: This method is only effective when called before starting navigation. Multiple alternative routes will not be available in the following cases: simulated navigation, routes with waypoints, or routes exceeding 80KM in length. Special Note: The current API is a paid service. If you wish to apply for a trial or official use, please submit a business cooperation ticket through the ticket system for communication https://lbs.amap.com/ More...
 
(void) - setIsOpenTrafficLight:
 
(BOOL) - calculateDriveRouteWithEndPoints:wayPoints:drivingStrategy:
 不带起点的驾车路径规划 Driving route planning without starting point More...
 
(BOOL) - calculateDriveRouteWithStartPoints:endPoints:wayPoints:drivingStrategy:
 带起点的驾车路径规划 Driving route planning with starting point More...
 
(BOOL) - calculateDriveRouteWithStartPOIInfos:endPOIInfos:wayPOIInfos:drivingStrategy:
 多起点多终点的驾车路径规划,注意AMapNaviPOIInfo中,如果POIID合法,优先使用ID参与算路,否则使用其坐标点. 注意:POIID和坐标点不能同时为空 Multi-origin and multi-destination driving route planning. Note: In AMapNaviPOIInfo, if the POIID is valid, the ID will be prioritized for route calculation; otherwise, its coordinates will be used. Note: POIID and coordinates cannot both be empty. More...
 
(BOOL) - calculateDriveRouteWithStartPointPOIId:endPointPOIId:wayPointsPOIId:drivingStrategy:
 根据高德POIId进行驾车路径规划,为了保证路径规划的准确性,请尽量使用此方法. since 6.1.0 Plan driving routes based on Amap POIId. To ensure route planning accuracy, please try to use this method More...
 
(BOOL) - calculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:
 根据高德POIInfo进行驾车路径规划,为了保证路径规划的准确性,请尽量使用此方法. since 6.4.0 Plan the driving route based on Amap POIInfo. To ensure the accuracy of the route planning, please try to use this method. More...
 
(BOOL) - calculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:calRouteOptions:
 根据高德POIInfo进行驾车路径规划. 可以自定义AMapNaviCalRouteOptions参数 since 10.1.0 Perform driving route planning based on AutoNavi POIInfo. Customizable AMapNaviCalRouteOptions parameters since version 10.1.0 More...
 
(BOOL) - calculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:callback:
 根据高德POIInfo进行驾车路径规划,为了保证路径规划的准确性,请尽量使用此方法. since 10.1.111 Plan the driving route based on Amap POIInfo. To ensure the accuracy of the route planning, please try to use this method. More...
 
(BOOL) - independentCalculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:callback:
 独立算路能力接口,可用于不干扰本次导航的单独算路场景. since 7.7.0 Independent route calculation capability interface, can be used for separate route calculation scenarios without interfering with the current navigation. since 10.3.0 Independent routing capability interface, can be used for separate routing scenarios without interfering with current navigation More...
 
(BOOL) - independentCalculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:calRouteOptions:callback:
 独立算路能力接口,可用于不干扰本次导航的单独算路场景. since 10.3.0 More...
 
(BOOL) - recalculateDriveRouteWithDrivingStrategy:
 导航过程中重新规划路径(起点为当前位置,途经点和终点位置不变) Re-plan the route during navigation (starting from the current position, with the waypoints and destination unchanged) More...
 
(BOOL) - recalculateDriveRouteWithDrivingStrategy:callback:
 导航过程中重新规划路径(起点为当前位置,途经点和终点位置不变)。since 10.1.111 Re-plan the route during navigation (starting from the current position, with the waypoints and destination unchanged) More...
 
(void) - setVehicleProvince:number:
 设置车牌信息. 已废弃,请使用 setVehicleInfo: 替代,since 6.0.0 Set license plate information. Deprecated, please use setVehicleInfo: instead More...
 
(BOOL) - setVehicleInfo:
 设置车辆信息. since 6.0.0 Set license plate information More...
 
(BOOL) - setBroadcastMode:
 设置播报模式. 注意:如果在导航过程中设置,需要在下次算路后才能起作用,如偏航重算、手动刷新后. Set broadcast mode. Note: If set during navigation, it will take effect after the next route calculation, such as rerouting after deviation or manual refresh More...
 
(BOOL) - setOnlineCarHailingType:
 设置网约车模式. since 6.4.0 Set ride-hailing mode More...
 
(nullable NSArray< AMapNaviTrafficStatus * > *) - getTrafficStatusesWithStartPosition:distance:
 获取某一范围内的路况光柱信息 Obtain traffic light pillar information within a certain range More...
 
(nullable NSArray< AMapNaviTrafficStatus * > *) - getTrafficStatuses
 获取当前道路的路况光柱信息 Get the traffic light column information of the current road More...
 
(void) - setXcodeSimulateLocationEnable:
 设置Xcode模拟定位点是否参与导航. 注意:此方法仅供开发者调试使用. since 6.7.0 Set whether the Xcode simulated location point participates in navigation. Note: This method is for developer debugging only. More...
 
(void) - setServiceAreaDetailsEnable:
 
(BOOL) - pushDriveRouteWithRouteGuideData:startPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:
 路线还原接口。since 9.0.0 Route restore interface More...
 
(NSString *_Nullable) - getPushDataNaviVersion
 获取导航路线还原版本号。since 9.0.0 Get navigation route restoration version number More...
 
(NSString *_Nullable) - routeSDKVersion
 获得 routeService 版本号。 Get the version number of routeService More...
 
(NSString *_Nullable) - routeServerVersion
 获得 routeServer 版本号。 Get the version number of routeServer More...
 
(BOOL) - setEscortMissonID:
 设置一路护航任务id. 注意:此方法必须在"开始算路"之前设置, 否则无效, since 6.7.0 More...
 
(BOOL) - setExtenalCloudControl:
 私有实例接口,外部禁止调用. since 7.8.0 Private instance interfaces, external calls are prohibited More...
 
(BOOL) - getRestrictareaInfoInRoute:callback:
 获取限行数据接口. 注意:当前接口为付费接口,使用当前接口需要 官网联系https://lbs.amap.com/ 商务 since 9.0.1 API for obtaining traffic restriction data. Note: This is a paid interface, to use it please contact the official website https://lbs.amap.com/ for business inquiries More...
 
- Instance Methods inherited from AMapNaviBaseManager
(BOOL) - playTTS:forcePlay:
 
(void) - setExternalLocation:isAMapCoordinate:
 设置外部传入定位的信息 Set externally transmitted location information More...
 
(void) - setEmulatorNaviSpeed:
 设置模拟导航的速度,默认60 Set the speed of simulated navigation, default is 60 More...
 
(BOOL) - startEmulatorNavi
 开始模拟导航. 注意:必须在路径规划成功的情况下,才能够开始模拟导航 Start simulated navigation. Note: Simulated navigation can only be started after successful route planning. More...
 
(BOOL) - startGPSNavi
 开始实时导航. 注意:必须在路径规划成功的情况下,才能够开始实时导航 Start real-time navigation. Note: Real-time navigation can only be started when the route planning is successful More...
 
(BOOL) - startEmulatorNavi:
 开始模拟导航. 注意:必须传入导航的路线组合routeGroup,才能够开始模拟导航. since 7.7.0 Start simulated navigation. Note: The routeGroup for navigation must be passed in to start simulated navigation. since 7.7.0 More...
 
(BOOL) - startGPSNavi:
 开始实时导航. 注意:必须传入导航的路线组合routeGroup,才能够开始实时导航. since 7.7.0 Start real-time navigation. Note: The routeGroup of the navigation must be passed in to start real-time navigation. since 7.7.0 More...
 
(void) - stopNavi
 停止导航,包含实时导航和模拟导航 Stop navigation, including real-time navigation and simulated navigation More...
 
(void) - pauseNavi
 暂停导航,包含实时导航和模拟导航 Pause navigation, including real-time navigation and simulated navigation More...
 
(void) - resumeNavi
 继续导航,包含实时导航和模拟导航 Resume navigation, including real-time navigation and simulated navigation More...
 
(BOOL) - readNaviInfoManual
 实时导航中手动触发一次信息播报. 注意:该接口仅支持驾车和步行,骑行不支持此功能. Manually trigger an information broadcast during real-time navigation. Note: This interface only supports driving and walking, cycling does not support this function. More...
 
(nullable NSArray< AMapNaviGuide * > *) - getNaviGuideList
 获取导航路线的路线详情列表 Get the route details list of the navigation route More...
 

Class Methods

(AMapNaviDriveManager *) + sharedInstance
 AMapNaviDriveManager单例。注意:如果已经获取了AMapNaviRideManager、AMapNaviWalkManager单例,需要调用对应的destroyInstance方法销毁单例,再获取驾车导航单例。since 10.1.200。 AMapNaviDriveManager singleton. Note: If you have already obtained the singleton instances of AMapNaviRideManager and AMapNaviWalkManager, you need to call the corresponding destroyInstance method to destroy the singletons before obtaining the driving navigation singleton. More...
 
(BOOL) + destroyInstance
 销毁AMapNaviDriveManager单例. AMapNaviDriveManager内存开销比较大,建议不使用时可销毁. since 5.4.0 Destroy the AMapNaviDriveManager singleton. AMapNaviDriveManager has a relatively large memory overhead, and it is recommended to destroy it when not in use. More...
 
(void) + pushTrajectoryRestoration:tracePoints:vehicleType:drivingStrategy:resultCallback:
 
(BOOL) + setCustomCloudControlEnable:
 私有静态方法,外部禁止调用. since 7.8.0 Private static methods, external calls are prohibited More...
 
- Class Methods inherited from AMapNaviBaseManager
(void) + setAppLang:authCallback:
 设置app语言类型和语音包路径,要确保AMapNaviDriveManager单例创建前设置。since 11.0.030 * Set the app language type and voice package path, ensure it is set before the singleton creation of AMapNaviDriveManager More...
 

Properties

id< AMapNaviDriveManagerDelegatedelegate
 
NSInteger naviRouteID
 
AMapNaviRoutenaviRoute
 
NSArray< NSNumber * > * naviRouteIDs
 
NSDictionary< NSNumber *, AMapNaviRoute * > * naviRoutes
 
BOOL updateCameraInfo
 
BOOL updateTrafficInfo
 
AMapNaviDetectedMode detectedMode
 
AMapNaviGPSSignalStrength gpsSignalStrength
 
NSUInteger gpsWeakDetecedInterval
 
- Properties inherited from AMapNaviBaseManager
AMapNaviMode naviMode
 
BOOL screenAlwaysBright
 
BOOL pausesLocationUpdatesAutomatically
 
BOOL allowsBackgroundLocationUpdates
 
BOOL enableExternalLocation
 
CLLocation * externalLocation
 
BOOL isUseInternalTTS
 
BOOL isUseTextPlay
 

Detailed Description

驾车导航管理类 Driving navigation management class

Method Documentation

◆ addDataRepresentative:

- (void) addDataRepresentative: (id< AMapNaviDriveDataRepresentable >)  aRepresentative

增加用于展示导航数据的DataRepresentative.注意:该方法不会增加实例对象的引用计数(Weak Reference) Add a DataRepresentative for displaying navigation data. Note: This method will not increase the reference count of the instance object (Weak Reference)

Parameters
aRepresentative实现了 AMapNaviDriveDataRepresentable 协议的实例 An instance that implements the AMapNaviDriveDataRepresentable protocol

◆ addEventListener:

- (void) addEventListener: (id< AMapNaviDriveManagerDelegate >)  aListener

增加用于接收导航回调事件的Listener, 效果等同于delegate. 注意:该方法不会增加实例对象的引用计数(Weak Reference). since 5.4.0 Adds a Listener to receive navigation callback events, functionally equivalent to a delegate. Note: This method does not increment the reference count of the instance object (Weak Reference)

Parameters
aListener实现了 AMapNaviDriveManagerDelegate 协议的实例 An instance that implements the AMapNaviDriveManagerDelegate protocol

◆ calculateDriveRouteWithEndPoints:wayPoints:drivingStrategy:

- (BOOL) calculateDriveRouteWithEndPoints: (NSArray< AMapNaviPoint * > *)  endPoints
wayPoints: (nullable NSArray< AMapNaviPoint * > *)  wayPoints
drivingStrategy: (AMapNaviDrivingStrategy strategy 

不带起点的驾车路径规划 Driving route planning without starting point

Parameters
endPoints终点坐标.终点列表的尾点为实时导航终点. Destination coordinates. The last point in the destination list is the real-time navigation destination
wayPoints途经点坐标,最多支持16个途经点. 超过16个会取前16个. Waypoint coordinates, up to 16 waypoints are supported. If more than 16, the first 16 will be taken
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 The success of validating the conditions and parameters required for route planning does not indicate the success of route calculation

◆ calculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:calRouteOptions:

- (BOOL) calculateDriveRouteWithStartPOIInfo: (nullable AMapNaviPOIInfo *)  startPOIInfo
endPOIInfo: (nonnull AMapNaviPOIInfo *)  endPOIInfo
wayPOIInfos: (nullable NSArray< AMapNaviPOIInfo * > *)  wayPOIInfos
calRouteOptions: (nullable AMapNaviCalRouteOptions *)  options 

根据高德POIInfo进行驾车路径规划. 可以自定义AMapNaviCalRouteOptions参数 since 10.1.0 Perform driving route planning based on AutoNavi POIInfo. Customizable AMapNaviCalRouteOptions parameters since version 10.1.0

Parameters
startPOIInfo起点POIInfo,参考 AMapNaviPOIInfo. 如果以“我的位置”作为起点,请传nil. 如果startPOIInfo不为nil,那么POIID合法,优先使用ID参与算路,否则使用坐标点. Starting POIInfo, refer to AMapNaviPOIInfo. If 'My Location' is used as the starting point, please pass nil. If startPOIInfo is not nil, then the POIID is valid, and the ID is prioritized for route calculation; otherwise, the coordinate point is used.
endPOIInfo终点POIInfo,参考 AMapNaviPOIInfo. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Destination POIInfo, refer to AMapNaviPOIInfo. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
wayPOIInfos途经点POIInfo,最多支持16个途经点,超过16个会取前16个. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Waypoint POIInfo, supports up to 16 waypoints, exceeding 16 will take the first 16. If the POIID is valid, the ID will be used for route calculation first, otherwise the coordinate point will be used. Note: POIID and coordinate point cannot both be empty.
optionsAMapNaviCalRouteOptions 传nil时,使用AMapNaviCalRouteOptions声明中的默认值 When AMapNaviCalRouteOptions pass nil, use the default value in the AMapNaviCalRouteOptions declaration
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 Whether the conditions and parameters required for route planning are successfully validated does not indicate the success of the route calculation.

◆ calculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:

- (BOOL) calculateDriveRouteWithStartPOIInfo: (nullable AMapNaviPOIInfo *)  startPOIInfo
endPOIInfo: (nonnull AMapNaviPOIInfo *)  endPOIInfo
wayPOIInfos: (nullable NSArray< AMapNaviPOIInfo * > *)  wayPOIInfos
drivingStrategy: (AMapNaviDrivingStrategy strategy 

根据高德POIInfo进行驾车路径规划,为了保证路径规划的准确性,请尽量使用此方法. since 6.4.0 Plan the driving route based on Amap POIInfo. To ensure the accuracy of the route planning, please try to use this method.

Parameters
startPOIInfo起点POIInfo,参考 AMapNaviPOIInfo. 如果以“我的位置”作为起点,请传nil. 如果startPOIInfo不为nil,那么POIID合法,优先使用ID参与算路,否则使用坐标点. Starting POIInfo, refer to AMapNaviPOIInfo. If 'My Location' is used as the starting point, please pass nil. If startPOIInfo is not nil, then the POIID is valid, and the ID is prioritized for route calculation; otherwise, the coordinate point is used.
endPOIInfo终点POIInfo,参考 AMapNaviPOIInfo. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Destination POIInfo, refer to AMapNaviPOIInfo. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
wayPOIInfos途经点POIInfo,最多支持16个途经点,超过16个会取前16个. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Waypoint POIInfo, up to 16 waypoints are supported. If more than 16, the first 16 will be taken. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 The success of validating the conditions and parameters required for route planning does not indicate the success of route calculation

◆ calculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:callback:

- (BOOL) calculateDriveRouteWithStartPOIInfo: (nullable AMapNaviPOIInfo *)  startPOIInfo
endPOIInfo: (nonnull AMapNaviPOIInfo *)  endPOIInfo
wayPOIInfos: (nullable NSArray< AMapNaviPOIInfo * > *)  wayPOIInfos
drivingStrategy: (AMapNaviDrivingStrategy strategy
callback: (nullable void(^)(AMapNaviCalculateRouteResult *_Nullable routeResult))  callback 

根据高德POIInfo进行驾车路径规划,为了保证路径规划的准确性,请尽量使用此方法. since 10.1.111 Plan the driving route based on Amap POIInfo. To ensure the accuracy of the route planning, please try to use this method.

Parameters
startPOIInfo起点POIInfo,参考 AMapNaviPOIInfo. 如果以“我的位置”作为起点,请传nil. 如果startPOIInfo不为nil,那么POIID合法,优先使用ID参与算路,否则使用坐标点. Starting POIInfo, refer to AMapNaviPOIInfo. If 'My Location' is used as the starting point, please pass nil. If startPOIInfo is not nil, then the POIID is valid, and the ID is prioritized for route calculation; otherwise, the coordinate point is used.
endPOIInfo终点POIInfo,参考 AMapNaviPOIInfo. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Destination POIInfo, refer to AMapNaviPOIInfo. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
wayPOIInfos途经点POIInfo,最多支持16个途经点,超过16个会取前16个. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Waypoint POIInfo, up to 16 waypoints are supported. If more than 16, the first 16 will be taken. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
callback算路结果回调。一次算路,routeResult 中的 routeRequestId 与 算路成功、算路失败接口中返回的 routeRequestId 一致 Routing result callback. For a single routing request, the routeRequestId in routeResult matches the routeRequestId returned by both the successful and failed routing interfaces.
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 The success of validating the conditions and parameters required for route planning does not indicate the success of route calculation

◆ calculateDriveRouteWithStartPOIInfos:endPOIInfos:wayPOIInfos:drivingStrategy:

- (BOOL) calculateDriveRouteWithStartPOIInfos: (NSArray< AMapNaviPOIInfo * > *)  startPOIInfos
endPOIInfos: (NSArray< AMapNaviPOIInfo * > *)  endPOIInfos
wayPOIInfos: (nullable NSArray< AMapNaviPOIInfo * > *)  wayPOIInfos
drivingStrategy: (AMapNaviDrivingStrategy strategy 

多起点多终点的驾车路径规划,注意AMapNaviPOIInfo中,如果POIID合法,优先使用ID参与算路,否则使用其坐标点. 注意:POIID和坐标点不能同时为空 Multi-origin and multi-destination driving route planning. Note: In AMapNaviPOIInfo, if the POIID is valid, the ID will be prioritized for route calculation; otherwise, its coordinates will be used. Note: POIID and coordinates cannot both be empty.

Parameters
startPOIInfos起点列表.起点列表的尾点为实时导航起点(如果为POI算路,仅最后一个点的mid不空即可), 其他坐标点为辅助信息,带有方向性,可有效避免算路到马路的另一侧. Starting point list. The last point in the starting point list is the real-time navigation starting point (if it is POI routing, only the mid of the last point needs to be non-empty). Other coordinate points serve as auxiliary information with directionality, effectively preventing route calculation to the opposite side of the road.
endPOIInfos终点列表.终点列表的尾点为实时导航终点(如果为POI算路,仅最后一个点的mid不空即可), 其他坐标点为辅助信息,带有方向性,可有效避免算路到马路的另一侧.. Destination list. The last point in the destination list is the real-time navigation endpoint (if it's POI routing, only the mid of the last point needs to be non-empty), Other coordinate points serve as auxiliary information, with directionality, effectively preventing route calculation to the opposite side of the road..
wayPOIInfos途经点POIInfo,最多支持16个途经点,超过16个会取前16个. The POIIinfo waypoint supports up to 16 waypoints, and if there are more than 16, the top 16 will be selected
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) For route calculation strategy, it is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [AutoNavi Map] (avoid congestion + prioritize speed + avoid tolls)
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 Whether the conditions and parameters required for route planning are successfully validated does not indicate the success of the route calculation.
Since
10.0.720

◆ calculateDriveRouteWithStartPointPOIId:endPointPOIId:wayPointsPOIId:drivingStrategy:

- (BOOL) calculateDriveRouteWithStartPointPOIId: (nullable NSString *)  startPOIId
endPointPOIId: (nonnull NSString *)  endPOIId
wayPointsPOIId: (nullable NSArray< NSString * > *)  wayPOIIds
drivingStrategy: (AMapNaviDrivingStrategy strategy 

根据高德POIId进行驾车路径规划,为了保证路径规划的准确性,请尽量使用此方法. since 6.1.0 Plan driving routes based on Amap POIId. To ensure route planning accuracy, please try to use this method

Parameters
startPOIId起点POIId,如果以“我的位置”作为起点,请传nil Starting point POIId, if using 'My Location' as the starting point, please pass nil
endPOIId终点POIId,必填 Destination POIId, required
wayPOIIds途经点POIId,最多支持16个途经点. 超过16个会取前16个 Waypoint POIId, up to 16 waypoints are supported. If more than 16, the first 16 will be taken
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 The success of validating the conditions and parameters required for route planning does not indicate the success of route calculation

◆ calculateDriveRouteWithStartPoints:endPoints:wayPoints:drivingStrategy:

- (BOOL) calculateDriveRouteWithStartPoints: (NSArray< AMapNaviPoint * > *)  startPoints
endPoints: (NSArray< AMapNaviPoint * > *)  endPoints
wayPoints: (nullable NSArray< AMapNaviPoint * > *)  wayPoints
drivingStrategy: (AMapNaviDrivingStrategy strategy 

带起点的驾车路径规划 Driving route planning with starting point

Parameters
startPoints起点坐标.起点列表的尾点为实时导航起点,其他坐标点为辅助信息,带有方向性,可有效避免算路到马路的另一侧. Starting coordinates. The last point in the starting list is the real-time navigation starting point, other coordinate points are auxiliary information, with directionality, which can effectively avoid routing to the other side of the road
endPoints终点坐标.终点列表的尾点为实时导航终点,其他坐标点为辅助信息,带有方向性,可有效避免算路到马路的另一侧. Ending coordinates. The last point in the ending list is the real-time navigation ending point, other coordinate points are auxiliary information, with directionality, which can effectively avoid routing to the other side of the road
wayPoints途经点坐标,最多支持16个途经点. 超过16个会取前16个 Waypoint coordinates, up to 16 waypoints are supported. If more than 16, the first 16 will be taken
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 The success of validating the conditions and parameters required for route planning does not indicate the success of route calculation

◆ destroyInstance

+ (BOOL) destroyInstance

销毁AMapNaviDriveManager单例. AMapNaviDriveManager内存开销比较大,建议不使用时可销毁. since 5.4.0 Destroy the AMapNaviDriveManager singleton. AMapNaviDriveManager has a relatively large memory overhead, and it is recommended to destroy it when not in use.

Returns
是否销毁成功. 如果返回NO,请检查单例是否被强引用 Whether destruction succeeded. If NO is returned, check if the singleton is strongly referenced

◆ getPushDataNaviVersion

- (NSString *_Nullable) getPushDataNaviVersion

获取导航路线还原版本号。since 9.0.0 Get navigation route restoration version number

Returns
routeguide 协议版本号。 Routeguide protocol version number

◆ getRestrictareaInfoInRoute:callback:

- (BOOL) getRestrictareaInfoInRoute: (AMapNaviRoute *)  route
callback: (nonnull void(^)(BOOL responseSuccess, NSString *responseData, NSString *errorDesc))  callback 

获取限行数据接口. 注意:当前接口为付费接口,使用当前接口需要 官网联系https://lbs.amap.com/ 商务 since 9.0.1 API for obtaining traffic restriction data. Note: This is a paid interface, to use it please contact the official website https://lbs.amap.com/ for business inquiries

Parameters
callback获取限行数据的回调. success 代表是否获取限行数据成功,获取限行数据成功时,responseData 不为空;获取限行数据失败时,errorDesc 不为空. Callback for retrieving traffic restriction data. 'success' indicates whether the traffic restriction data was successfully obtained. When the data is successfully obtained, 'responseData' is not empty; when the data acquisition fails, 'errorDesc' is not empty.
  1. success 为true response成功时返回结构体: When success is true, the response returns a structure { "code": 1, -—code的value 为 1 请求限行数据成功 The value of code is 1, indicating a successful request for traffic restriction data "citynums": 1, "citys": [{ "citycode": 000, "rulenums": 1, "cityname": "XX市", "title": "XXX限行政策", "rules": [{ "ruleid": 1766888, "ring": 0, "effect": 1, "local": 2, "vehicle": 1, "time": "全天限行", "policyname": "二环及以内外地机动车限行", "summary": "二环路及以内道路(不含外侧辅路)", "desc": "2021年11月1日起,外地全部机动车限行", "otherdesc": "", "centerpoint": "116.397451,39.909060", "linepoints": "", "areapoints": ""。 }] }] } code: code的value 为 1 请求限行数据成功, code 为value 非1值,则代表限行数据服务返回失败 If the value of code is 1, the request for traffic restriction data is successful; if the value of code is not 1, it indicates that the traffic restriction data service has failed. areapoints: 1.在同一限行区域存在一个限行多边形时,限行数据为经度和纬度使用逗号(,)隔开,多个经纬度使用分号(;)隔开; When there is a restricted polygon in the same restricted area, the restricted data is separated by a comma (,) for longitude and latitude, and multiple longitude and latitude coordinates are separated by a semicolon (;) example一个多边形数据: |-------------— 多边形1-----------------—| 每一个多边形对应一个polygon example: a polygon data |-------------— Polygon1-----------------—| Each polygon corresponds to one polygon lon1,lat1;lon2,lat2;lon3,lat3;lon4,lat4; 2.在同一限行区域存在多个限行多边形时,多个多边形之间的数据使用竖线 (|) 隔开; When multiple restricted polygons exist in the same restricted area, the data between multiple polygons is separated by a vertical bar (|) example3个多边形数据: |-------------— 多边形1-----------------—| |--------— 多边形2--------—| |--------— 多边形3--------—| example: 3 polygon data: |-------------— Polygon1-----------------—| |--------— Polygon2--------—| |--------— Polygon3--------—| lon1,lat1;lon2,lat2;lon3,lat3;lon4,lat4| lon5,lat5;lon6,lat6;lon7,lat7| lon8,lat8;lon9,lat9;lon10,lat10 2.success 为false response为空,errorDesc为返回的错误描述 success is false, response is empty, errorDesc is the returned error description
Returns
获取限行条件是否满足;路线上数据不为空,且路线上有限行信息,则返回YES,否则的话则返回NO;不代表获取限行数据成功与否 Check if the traffic restriction conditions are met; if the route data is not empty and contains traffic restriction information, return YES; otherwise return NO; this does not indicate whether the traffic restriction data was successfully obtained

Provided by category AMapNaviDriveManager(Private).

◆ getTrafficStatuses

- (nullable NSArray<AMapNaviTrafficStatus *> *) getTrafficStatuses

获取当前道路的路况光柱信息 Get the traffic light column information of the current road

Returns
该范围内路况信息数组,可用于绘制光柱,参考 AMapNaviTrafficStatus 类. The traffic information array within this range can be used to draw light columns, refer to class AMapNaviTrafficStatus.

◆ getTrafficStatusesWithStartPosition:distance:

- (nullable NSArray<AMapNaviTrafficStatus *> *) getTrafficStatusesWithStartPosition: (int)  startPosition
distance: (int)  distance 

获取某一范围内的路况光柱信息 Obtain traffic light pillar information within a certain range

Parameters
startPosition光柱范围在路径中的起始位置,取值范围[0, routeLength) Starting position of the light pillar range in the path, value range [0, routeLength)
distance光柱范围的距离,startPosition + distance 和的取值范围(0, routelength] The distance of the light beam range, the value range of startPosition + distance is (0, routelength]
Returns
该范围内路况信息数组,可用于绘制光柱,参考 AMapNaviTrafficStatus 类. The traffic information array within this range can be used to draw the light beam, refer to class AMapNaviTrafficStatus.

◆ independentCalculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:calRouteOptions:callback:

- (BOOL) independentCalculateDriveRouteWithStartPOIInfo: (nullable AMapNaviPOIInfo *)  startPOIInfo
endPOIInfo: (nonnull AMapNaviPOIInfo *)  endPOIInfo
wayPOIInfos: (nullable NSArray< AMapNaviPOIInfo * > *)  wayPOIInfos
calRouteOptions: (nullable AMapNaviCalRouteOptions *)  options
callback: (nullable void(^)(AMapNaviRouteGroup *_Nullable routeGroup, NSError *_Nullable error))  callback 

独立算路能力接口,可用于不干扰本次导航的单独算路场景. since 10.3.0

Parameters
startPOIInfo起点POIInfo,参考 AMapNaviPOIInfo. 如果以“我的位置”作为起点,请传nil. 如果startPOIInfo不为nil,那么POIID合法,优先使用ID参与算路,否则使用坐标点. Starting POIInfo, refer to AMapNaviPOIInfo. If 'My Location' is used as the starting point, please pass nil. If startPOIInfo is not nil, then the POIID is valid, and the ID is prioritized for route calculation; otherwise, the coordinate point is used.
endPOIInfo终点POIInfo,参考 AMapNaviPOIInfo. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Destination POIInfo, refer to AMapNaviPOIInfo. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
wayPOIInfos途经点POIInfo,最多支持16个途经点,超过16个会取前16个. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Waypoint POIInfo, supports up to 16 waypoints, exceeding 16 will take the first 16. If the POIID is valid, the ID will be used for route calculation first, otherwise the coordinate point will be used. Note: POIID and coordinate point cannot both be empty.
optionsAMapNaviCalRouteOptions 传nil时,使用AMapNaviCalRouteOptions声明中的默认值 When passing nil for AMapNaviCalRouteOptions, use the default values declared in AMapNaviCalRouteOptions
callback算路完成的回调. 算路成功时,routeGroup 不为空;算路失败时,error 不为空,error.code参照 AMapNaviCalcRouteState. Callback for route calculation completion. When the route calculation is successful, routeGroup is not empty; when it fails, error is not empty, and error.code refers to AMapNaviCalcRouteState.
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 Whether the conditions and parameters required for route planning are successfully validated does not indicate the success of the route calculation.

◆ independentCalculateDriveRouteWithStartPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:callback:

- (BOOL) independentCalculateDriveRouteWithStartPOIInfo: (nullable AMapNaviPOIInfo *)  startPOIInfo
endPOIInfo: (nonnull AMapNaviPOIInfo *)  endPOIInfo
wayPOIInfos: (nullable NSArray< AMapNaviPOIInfo * > *)  wayPOIInfos
drivingStrategy: (AMapNaviDrivingStrategy strategy
callback: (nullable void(^)(AMapNaviRouteGroup *_Nullable routeGroup, NSError *_Nullable error))  callback 

独立算路能力接口,可用于不干扰本次导航的单独算路场景. since 7.7.0 Independent route calculation capability interface, can be used for separate route calculation scenarios without interfering with the current navigation. since 10.3.0 Independent routing capability interface, can be used for separate routing scenarios without interfering with current navigation

Parameters
startPOIInfo起点POIInfo,参考 AMapNaviPOIInfo. 如果以“我的位置”作为起点,请传nil. 如果startPOIInfo不为nil,那么POIID合法,优先使用ID参与算路,否则使用坐标点. Starting POIInfo, refer to AMapNaviPOIInfo. If 'My Location' is used as the starting point, please pass nil. If startPOIInfo is not nil, then the POIID is valid, and the ID is prioritized for route calculation; otherwise, the coordinate point is used.
endPOIInfo终点POIInfo,参考 AMapNaviPOIInfo. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Destination POIInfo, refer to AMapNaviPOIInfo. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
wayPOIInfos途经点POIInfo,最多支持16个途经点,超过16个会取前16个. 如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Waypoint POIInfo, up to 16 waypoints are supported. If more than 16, the first 16 will be taken. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
callback算路完成的回调. 算路成功时,routeGroup 不为空;算路失败时,error 不为空,error.code参照 AMapNaviCalcRouteState. Callback for route calculation completion. When the route calculation is successful, routeGroup is not empty; when it fails, error is not empty, and error.code refers to AMapNaviCalcRouteState.
Returns
规划路径所需条件和参数校验是否成功,不代表算路成功与否 The success of validating the conditions and parameters required for route planning does not indicate the success of route calculation

◆ init

- (instancetype) init

请使用单例替代. since 5.4.0 init已被禁止使用,请使用单例 [AMapNaviDriveManager sharedInstance] 替代,且在调用类的 dealloc 函数或其他适当时机(如导航ViewController被pop时),调用 [AMapNaviDriveManager destroyInstance] 来销毁单例(需要注意如未销毁成功,请检查单例是否被强引用) Please use a singleton instead. 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)

◆ pushDriveRouteWithRouteGuideData:startPOIInfo:endPOIInfo:wayPOIInfos:drivingStrategy:

- (BOOL) pushDriveRouteWithRouteGuideData: (nonnull NSData *)  routeData
startPOIInfo: (nonnull AMapNaviPOIInfo *)  startPOIInfo
endPOIInfo: (nonnull AMapNaviPOIInfo *)  endPOIInfo
wayPOIInfos: (nullable NSArray< AMapNaviPOIInfo * > *)  wayPOIInfos
drivingStrategy: (AMapNaviDrivingStrategy strategy 

路线还原接口。since 9.0.0 Route restore interface

Parameters
startPOIInfo起点POIInfo,参考 AMapNaviPOIInfo。如果以“我的位置”作为起点,请传nil。 如果startPOIInfo不为nil,那么POIID合法,优先使用ID参与算路,否则使用坐标点. Starting POIInfo, refer to AMapNaviPOIInfo. If 'My Location' is used as the starting point, please pass nil. If startPOIInfo is not nil, then the POIID is valid, and the ID is prioritized for route calculation; otherwise, the coordinate point is used.
endPOIInfo终点POIInfo,参考 AMapNaviPOIInfo。如果POIID合法,优先使用ID参与算路,否则使用坐标点. 注意:POIID和坐标点不能同时为空 Destination POIInfo, refer to AMapNaviPOIInfo. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
wayPOIInfos途经点POIInfo,最多支持16个途经点,超过16个会取前16个。如果POIID合法,优先使用ID参与算路,否则使用坐标点。 注意:POIID和坐标点不能同时为空。 Waypoint POIInfo, up to 16 waypoints are supported. If more than 16, the first 16 will be taken. If the POIID is valid, use the ID for route calculation first; otherwise, use the coordinate point. Note: POIID and coordinate point cannot both be empty.
strategy路径的计算策略。 Route calculation strategy
Returns
路线还原是否成功。 Whether route restoration is successful

◆ pushTrajectoryRestoration:tracePoints:vehicleType:drivingStrategy:resultCallback:

+ (void) pushTrajectoryRestoration: (NSArray< AMapNaviPoint * > *)  wayPoints
tracePoints: (NSArray< AMapNaviPoint * > *)  tracePoints
vehicleType: (NSInteger)  vehicleType
drivingStrategy: (AMapNaviDrivingStrategy drivingStrategy
resultCallback: (void(^)(BOOL isLoadSuc))  resultCallback 

◆ recalculateDriveRouteWithDrivingStrategy:

- (BOOL) recalculateDriveRouteWithDrivingStrategy: (AMapNaviDrivingStrategy strategy

导航过程中重新规划路径(起点为当前位置,途经点和终点位置不变) Re-plan the route during navigation (starting from the current position, with the waypoints and destination unchanged)

Parameters
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
Returns
重新规划路径所需条件和参数校验是否成功, 不代表算路成功与否, 如非导航状态下调用此方法会返回NO. The successful validation of conditions and parameters required for re-planning does not guarantee successful route calculation. Calling this method outside of navigation mode will return NO.

◆ recalculateDriveRouteWithDrivingStrategy:callback:

- (BOOL) recalculateDriveRouteWithDrivingStrategy: (AMapNaviDrivingStrategy strategy
callback: (nullable void(^)(AMapNaviCalculateRouteResult *_Nullable routeResult))  callback 

导航过程中重新规划路径(起点为当前位置,途经点和终点位置不变)。since 10.1.111 Re-plan the route during navigation (starting from the current position, with the waypoints and destination unchanged)

Parameters
strategy路径的计算策略,建议使用 AMapNaviDrivingStrategyMultipleDefault,与[高德地图]默认策略一致 (避让拥堵+速度优先+避免收费) The route calculation strategy is recommended to use AMapNaviDrivingStrategyMultipleDefault, which is consistent with the default strategy of [Gaode Map] (avoid congestion + speed priority + avoid tolls)
callback算路结果回调。一次算路,routeResult 中的 routeRequestId 与 算路成功、算路失败接口中返回的 routeRequestId 一致 Routing result callback. For a single routing request, the routeRequestId in routeResult matches the routeRequestId returned by both the successful and failed routing interfaces.
Returns
重新规划路径所需条件和参数校验是否成功, 不代表算路成功与否, 如非导航状态下调用此方法会返回NO. The successful validation of conditions and parameters required for re-planning does not guarantee successful route calculation. Calling this method outside of navigation mode will return NO.

◆ removeDataRepresentative:

- (void) removeDataRepresentative: (id< AMapNaviDriveDataRepresentable >)  aRepresentative

移除用于展示导航数据的DataRepresentative Remove the DataRepresentative used to display navigation data

Parameters
aRepresentative实现了 AMapNaviDriveDataRepresentable 协议的实例 An instance that implements the AMapNaviDriveDataRepresentable protocol

◆ removeEventListener:

- (void) removeEventListener: (id< AMapNaviDriveManagerDelegate >)  aListener

移除用于接收导航回调事件的Listener. since 5.4.0 Remove the Listener used to receive navigation callback events

Parameters
aListener实现了 AMapNaviDriveManagerDelegate 协议的实例 An instance that implements the AMapNaviDriveManagerDelegate protocol

◆ routeSDKVersion

- (NSString *_Nullable) routeSDKVersion

获得 routeService 版本号。 Get the version number of routeService

Returns
routeService 协议版本号。 RouteService protocol version number

◆ routeServerVersion

- (NSString *_Nullable) routeServerVersion

获得 routeServer 版本号。 Get the version number of routeServer

Returns
routeServer 协议版本号。 RouteServer protocol version number

◆ selectNaviRouteWithRouteID:

- (BOOL) selectNaviRouteWithRouteID: (NSInteger)  routeID

多路径规划时选择路径.注意:该方法仅限于在开始导航前使用,开始导航后该方法无效. Selecting a route during multi-route planning. Note: This method is only available before starting navigation and becomes invalid after navigation starts

Parameters
routeID路径ID Route ID
Returns
是否选择路径成功 Whether the route selection is successful

◆ setBroadcastMode:

- (BOOL) setBroadcastMode: (AMapNaviBroadcastMode mode

设置播报模式. 注意:如果在导航过程中设置,需要在下次算路后才能起作用,如偏航重算、手动刷新后. Set broadcast mode. Note: If set during navigation, it will take effect after the next route calculation, such as rerouting after deviation or manual refresh

Parameters
mode参考 AMapNaviBroadcastMode . 默认新手详细播报( AMapNaviBroadcastModeDetailed ) Refer to AMapNaviBroadcastMode. Default is detailed broadcast for beginners.( AMapNaviBroadcastModeDetailed )
Returns
是否成功 Whether successful

◆ setCustomCloudControlEnable:

+ (BOOL) setCustomCloudControlEnable: (BOOL)  enable

私有静态方法,外部禁止调用. since 7.8.0 Private static methods, external calls are prohibited

Provided by category AMapNaviDriveManager(Private).

◆ setEscortMissonID:

- (BOOL) setEscortMissonID: (NSNumber *)  missonID

设置一路护航任务id. 注意:此方法必须在"开始算路"之前设置, 否则无效, since 6.7.0

设置一路护航任务id. 注意:此方法必须在"开始算路"之前设置, 否则无效, since 6.7.0 Set the escort task ID. Note: This method must be set before "start routing", otherwise it will be invalid

Parameters
missonID一路护航的任务id The task ID of the escort
Returns
是否设置成功 Whether the setting is successful

Provided by category AMapNaviDriveManager(Escort).

◆ setExtenalCloudControl:

- (BOOL) setExtenalCloudControl: (nullable NSString *)  cloudControlString

私有实例接口,外部禁止调用. since 7.8.0 Private instance interfaces, external calls are prohibited

Provided by category AMapNaviDriveManager(Private).

◆ setIsOpenTrafficLight:

- (void) setIsOpenTrafficLight: (NSString *)  key

设置是否显示红绿灯倒计时。since 10.0.700 Set whether to display traffic light countdown

◆ setMultipleRouteNaviMode:

- (void) setMultipleRouteNaviMode: (BOOL)  multipleRouteNaviMode

设置多路线导航模式(实时导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式). 注意: 1、设置的导航模式会在下一次主动路径规划时生效, 建议在 AMapNaviDriveManager 单例初始化时就进行设置. 2、多路线导航模式还需同时满足以下4个条件才能够生效:a.路径规划时 AMapNaviDrivingStrategy 需选用多路径策略; b.起终点的直线距离需<=80KM; c.不能有途径点; d.车辆不能是货车类型. since 6.3.0 Set multi-route navigation mode (providing several alternative routes for users to choose from during real-time navigation), or single-route navigation mode (default mode). Note: 1. The set navigation mode will take effect the next time active route planning is initiated. It is recommended to set it during the initialization of the AMapNaviDriveManager singleton. 2. The multi-route navigation mode also needs to meet the following 4 conditions to take effect: a. When planning the route, AMapNaviDrivingStrategy needs to adopt the multi-path strategy; b. The straight-line distance between the start and end points must be <=80KM; c. There should be no waypoints; d. The vehicle type must not be a truck.

Parameters
multipleRouteNaviModeYES:多路线导航模式, NO:单路线导航模式(默认) YES: Multi-route navigation mode, NO: Single-route navigation mode (default)

◆ setOnlineCarHailingType:

- (BOOL) setOnlineCarHailingType: (AMapNaviOnlineCarHailingType type

设置网约车模式. since 6.4.0 Set ride-hailing mode

Parameters
type参考 AMapNaviOnlineCarHailingType. 默认为 AMapNaviOnlineCarHailingTypeNone (非网约车模式, 即正常模式) Refer to AMapNaviOnlineCarHailingType. Default is AMapNaviOnlineCarHailingTypeNone.(Non-ride-hailing mode, i.e., normal mode)
Returns
是否设置成功 Whether the setup is successful

◆ setServiceAreaDetailsEnable:

- (void) setServiceAreaDetailsEnable: (BOOL)  enable

◆ setTruckMultipleRouteNaviMode:

- (void) setTruckMultipleRouteNaviMode: (BOOL)  multipleRouteNaviMode

设置货车多路线导航模式(导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式)。建议在 AMapNaviDriveManager 单例初始化时就进行设置。注意:此方法仅限于在开始导航前调用有效,以下情况不会出现多备选路线:模拟导航、路线存在途经点、路线长度超过80KM。特别注意:当前接口为收费接口,您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/。since 9.3.5 Set truck multi-route navigation mode (with several alternative routes available for users to choose during navigation), or single-route navigation mode (default mode). It is recommended to set this during the initialization of the AMapNaviDriveManager singleton. Note: This method is only effective when called before starting navigation. Multiple alternative routes will not be available in the following cases: simulated navigation, routes with waypoints, or routes exceeding 80KM in length. Special Note: The current API is a paid service. If you wish to apply for a trial or official use, please submit a business cooperation ticket through the ticket system for communication https://lbs.amap.com/

Parameters
multipleRouteNaviModeYES:多路线导航模式, NO:单路线导航模式. 默认为NO. YES: Multi-route navigation mode, NO: Single-route navigation mode. Default is NO.

◆ setVehicleInfo:

- (BOOL) setVehicleInfo: (nullable AMapNaviVehicleInfo *)  vehicleInfo

设置车辆信息. since 6.0.0 Set license plate information

Parameters
vehicleInfo车辆信息,参考 AMapNaviVehicleInfo. 如果要清空已设置的车辆信息,传入nil即可. Vehicle information, refer to AMapNaviVehicleInfo. To clear the set vehicle information, pass nil
Returns
是否设置成功 Whether the setup is successful

◆ setVehicleProvince:number:

- (void) setVehicleProvince: (NSString *)  province
number: (NSString *)  number 

设置车牌信息. 已废弃,请使用 setVehicleInfo: 替代,since 6.0.0 Set license plate information. Deprecated, please use setVehicleInfo: instead

Parameters
province车牌省份缩写,例如:"京" License plate province abbreviation, for example: "Jing"
number除省份及标点之外,车牌的字母和数字,例如:"NH1N11" Letters and numbers of the license plate except for the province and punctuation, for example: "NH1N11"

◆ setXcodeSimulateLocationEnable:

- (void) setXcodeSimulateLocationEnable: (BOOL)  enableNavi

设置Xcode模拟定位点是否参与导航. 注意:此方法仅供开发者调试使用. since 6.7.0 Set whether the Xcode simulated location point participates in navigation. Note: This method is for developer debugging only.

Parameters
enableNavi模拟的定位点是否参与导航, 默认为NO. Whether simulated location points participate in navigation, default is NO

◆ sharedInstance

+ (AMapNaviDriveManager *) sharedInstance

AMapNaviDriveManager单例。注意:如果已经获取了AMapNaviRideManager、AMapNaviWalkManager单例,需要调用对应的destroyInstance方法销毁单例,再获取驾车导航单例。since 10.1.200。 AMapNaviDriveManager singleton. Note: If you have already obtained the singleton instances of AMapNaviRideManager and AMapNaviWalkManager, you need to call the corresponding destroyInstance method to destroy the singletons before obtaining the driving navigation singleton.

Returns
AMapNaviDriveManager实例 AMapNaviDriveManager instance

◆ switchParallelRoad:

- (void) switchParallelRoad: (AMapNaviParallelRoadInfo *)  parallelRoadInfo

切换平行道路, 包括主辅路切换、高架上下切换. 该方法需要配合 AMapNaviDriveDataRepresentable 的 driveManager:updateParallelRoadStatus: 回调使用. since 5.3.0 Switch parallel roads, including main/auxiliary road switching and elevated road level switching. This method needs to be used with the driveManager:updateParallelRoadStatus: callback of AMapNaviDriveDataRepresentable

Parameters
parallelRoadInfo平行路切换信息,参考 AMapNaviParallelRoadInfo. Parallel road switching information, refer to AMapNaviParallelRoadInfo.

Property Documentation

◆ delegate

- (id<AMapNaviDriveManagerDelegate>) delegate
readwritenonatomicweak

实现了 AMapNaviDriveManagerDelegate 协议的类指针 A class pointer implementing the AMapNaviDriveManagerDelegate protocol

◆ detectedMode

- (AMapNaviDetectedMode) detectedMode
readwritenonatomicassign

巡航模式,默认为 AMapNaviDetectedModeNone. 注意:1. 如果已经处在导航模式,要开启巡航模式时,需要先调用 stopNavi 来停止导航,再设置 detectedMode 才能生效 2.如果已经处于巡航模式,要开启导航前,需要先调用setDetectedMode(AMapNaviDetectedModeNone) 来关闭巡航,再开启导航 Cruise mode, Default is AMapNaviDetectedModeNone. Note: 1. If already in navigation mode, to enable cruise mode, you need to first call stopNavi to stop navigation, and then set detectedMode for it to take effect. 2. If already in cruise mode, before starting navigation, you need to first call setDetectedMode(AMapNaviDetectedModeNone) to turn off cruise mode, then start navigation.

◆ gpsSignalStrength

- (AMapNaviGPSSignalStrength) gpsSignalStrength
readnonatomicassign

卫星定位信号强度类型, 参考 AMapNaviGPSSignalStrength since 7.8.0 只在导航中获取卫星定位信号强弱的值才有效 Satellite Positioning Signal Strength Type, refer to AMapNaviGPSSignalStrength; since 7.8.0, only valid when obtaining GPS signal strength values during navigation

◆ gpsWeakDetecedInterval

- (NSUInteger) gpsWeakDetecedInterval
readwritenonatomicassign

默认为10, 范围为[ 5, 15 ], 单位秒. 表示有连续的10s, 定位信号质量都比较差, 就会触发手机卫星定位信号弱的回调. 值越小, 就越容易触发. since 6.6.0 Default is 10, range is [5, 15], unit in seconds. It means if the positioning signal quality remains poor for 10 continuous seconds, the callback for weak satellite positioning signal on the phone will be triggered. The smaller the value, the easier it is to trigger.

◆ naviRoute

- (AMapNaviRoute*) naviRoute
readnonatomicassign

当前导航路径的信息,参考 AMapNaviRoute 类. The information of the current navigation path, refer to the AMapNaviRoute class.

◆ naviRouteID

- (NSInteger) naviRouteID
readnonatomicassign

当前导航路径的ID The ID of the current navigation path

◆ naviRouteIDs

- (NSArray<NSNumber *>*) naviRouteIDs
readnonatomicassign

多路径规划时的所有路径ID,路径ID为 NSInteger 类型. All route IDs during multi-route planning, the route ID is of NSInteger type

◆ naviRoutes

- (NSDictionary<NSNumber *, AMapNaviRoute *>*) naviRoutes
readnonatomicassign

多路径规划时的所有路径信息,参考 AMapNaviRoute 类. All route information during multi-route planning, refer to the AMapNaviRoute class.

◆ updateCameraInfo

- (BOOL) updateCameraInfo
readwritenonatomicassign

导航中是否播报交通信息,默认YES(需要联网). Whether to announce traffic information during navigation, default YES (requires internet connection) 导航中是否播报摄像头信息,默认YES. 调用此接口无效 Whether to announce camera information during navigation, default is YES. Calling this interface is invalid.

◆ updateTrafficInfo

- (BOOL) updateTrafficInfo
readwritenonatomicassign

是否播报交通信息,默认YES(需要联网). 注意:关闭后,巡航模式 不会播放相关信息; 打开后,不设置巡航模块也会播放前方拥堵信息; 导航和巡航的播报是互斥的,导航中,不会有巡航的播报 Whether to broadcast traffic information, default is YES (requires internet connection) Attention: After being turned off, the cruise mode will not play relevant information; After opening, even without setting the cruise control module, congestion information ahead will still be played; Navigation and cruise broadcasts are mutually exclusive, and there will be no cruise broadcast in navigation


The documentation for this class was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。