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

Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
AMapNaviDriveView Class Reference

`#include <AMapNaviDriveView.h>`

Inheritance diagram for AMapNaviDriveView:

## Instance Methods
(instancetype) | - initWithFrame:viewConfig:
| 初始化接口 Initialize interface
(void) | - addEventListener:
| 增加用于接收View回调事件的Listener, 效果等同于delegate. 注意:该方法不会增加实例对象的引用计数(Weak Reference). since 10.1.300
(void) | - removeEventListener:
| 移除用于接收View回调事件的Listener. since 10.1.300
(id< MAMapViewDelegate > mapViewDelegate) | - __attribute
(void) | - setCustomMapStyleOptions:
| 自定义地图样式设置,可以支持分级样式配置,如控制不同级别显示不同的颜色(自7.8.0开始使用新版样式,请到官网(lbs.amap.com)更新新版样式文件,否则无法正常显示路口放大图) Custom map style settings, support hierarchical style configuration, such as controlling different levels to display different colors (starting from version 7.8.0, use the new style, please update the new style file on the official website (lbs.amap.com), otherwise the junction enlargement map cannot be displayed normally)
(BOOL autoSwitchDayNightType) | - __attribute
(BOOL showStandardNightType) | - __attribute
(BOOL showTrafficLayer) | - __attribute
(void) | - setCameraImage:
| 设置摄像头图标 Set camera icon 注意:与showCamera 相关
(void) | - setStartPointImage:
| 设置路径起点图标 Set route start point icon
(void) | - setWayPointImage:
| 设置路径途经点图标 Set route waypoint icon
(void) | - setEndPointImage:
| 设置路径终点图标 Set route end point icon
(void) | - setCarImage:
| 设置自车图标 Set vehicle icon
(void) | - setCarImageWithSize:
| 设置自车图标，保持图片大小 与 (void)setCarImage:carImage; 效果一样 Set the ego vehicle icon and maintain the image size Compared to (void) setCarImage: (voidable UIImage *) carImage; The effect is the same
(void) | - setCarCompassImage:
| 设置自车罗盘图标 Set vehicle compass icon
(BOOL) | - addAnnotation:
| 在导航地图中添加自定义标注. since 10.0.920 需要在自定义driveView被此接口addDataRepresentativer添加后调用，否则会添加失败 Add custom annotations to the navigation map. since 10.0.920 This method must be called after the custom driveView is added by the addDataRepresentativer interface, otherwise the addition will fail 注意:生效范围 行前 行中 Note: Effective scope is currently in progress 使用示例: Usage example: AMapNaviCustomAnnotationItemIconModel* iconNormal = [AMapNaviCustomAnnotationItemIconModel new]; iconNormal.image = [UIImage imageNamed: "default_navi_route_startpoint"]; AMapNaviCustomAnnotation *annotaion = [[AMapNaviCustomAnnotation alloc] initWithCoordinate:CLLocationCoordinate2DMake(40.027438, 116.446969) iconModel:iconNormal]; BOOL result = [self.driveView addAnnotation:annotaion]; if (result) { NSLog(@"add succuss"); } annotaion.clickBlock = ^() { NSLog(@"on clicked annotaion:%",annotaion); };
(void) | - removeAnnotation:
| 移除导航地图中的自定义标注. since 10.0.920 Remove custom annotations from the navigation map. since 10.0.920 注意:生效范围 行前 行中 Note: Effective scope is currently in progress
(void) | - addCustomAnnotation:
| 在导航地图中添加自定义标注. since 6.2.0 Add custom annotations to the navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress
(void) | - removeCustomAnnotation:
| 移除导航地图中的自定义标注. since 6.2.0 Remove custom annotations from the navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress
(void) | - addCustomOverlay:
| 在导航地图中添加自定义overlay. since 6.7.0 Add custom overlay to the navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress
(void) | - removeCustomOverlay:
| 移除导航地图中的自定义overlay. since 6.7.0 Remove custom overlay from navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress
(void) | - updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview
| 在全览状态下调用此函数能够让路线显示在可视区域内(排除EdgePadding后剩余的区域)，保证路线不被自定义界面元素遮挡. 比如showUIElements为NO时（自定义界面）横竖屏切换后，可以调用此函数. since 6.2.0 Calling this function in overview mode ensures the route is displayed within the visible area (remaining region after excluding EdgePadding), preventing the route from being obscured by custom UI elements. For example, when showUIElements is set to NO (custom interface), this function can be called after switching between portrait and landscape modes
(BOOL) | - goBackToPlanState
| 回到行前状态，只有用户初始状态是行前时，且当前是行中时返回YES,其它状态返回NO Return to the pre line state, only when the user's initial state is pre line and the current state is in line, return YES; for other states, return NO
(instancetype) | - initWithFrame:mapView:
Instance Methods inherited from <AMapNaviDriveDataRepresentable>
(void) | - driveManager:updateNaviMode:
| 导航模式更新回调. 从5.3.0版本起,算路失败后导航SDK只对外通知算路失败,SDK内部不再执行停止导航的相关逻辑.因此,当算路失败后,不会收到 driveManager:updateNaviMode: 回调; AMapNaviDriveManager.naviMode 不会切换到 AMapNaviModeNone 状态, 而是会保持在 AMapNaviModeGPS or AMapNaviModeEmulator 状态. Navigation mode update callback. Starting from version 5.3.0, after route calculation fails, the navigation SDK only notifies externally about the route calculation failure, and the SDK no longer executes the related logic to stop navigation internally. Therefore, after route calculation fails, the driveManager:updateNaviMode: callback will not be received. AMapNaviDriveManager.naviMode will not switch to the AMapNaviModeNone state, but will remain in the AMapNaviModeGPS or AMapNaviModeEmulator state.
(void) | - driveManager:updateNaviRouteID:
| 路径ID更新回调. 注意：请不要在此回调中调用 -selectNaviRouteWithRouteID: 接口，否则会出现死循环调用. Route ID update callback. Note: Please do not call the -selectNaviRouteWithRouteID: interface in this callback, otherwise it will cause an infinite loop call.
(void) | - driveManager:updateNaviRoute:
| 路径信息更新回调. 注意：请不要在此回调中调用 -selectNaviRouteWithRouteID: 接口，否则会出现死循环调用. Path Information Update Callback. Note: Please do not call the -selectNaviRouteWithRouteID: interface in this callback, otherwise it will cause an infinite loop call.
(void) | - driveManager:updateNaviInfo:
| 导航信息更新回调 Navigation Information Update Callback
(void) | - driveManager:updateNaviLocation:
| 自车位置更新回调 (since 5.0.0，模拟导航和实时导航的自车位置更新都会走此回调) Self-Vehicle Position Update Callback (since 5.0.0, both simulated navigation and real-time navigation's ego vehicle position updates will trigger this callback)
(void) | - driveManager:showCrossImage:
| 需要显示路口放大图时的回调。注意：10.0.2版本开始，自定义View中如果设置了showCrossImage为YES，回调中crossImage为nil Callback when an enlarged intersection view is needed. Note: Starting from version 10.0.2, if showCrossImage is set to YES in a custom View, crossImage will be nil in the callback.
(void) | - driveManagerHideCrossImage:
| 需要隐藏路口放大图时的回调。 Callback when the junction enlarged view needs to be hidden.
(void) | - driveManager:showLaneBackInfo:laneSelectInfo:
| 需要显示车道信息时的回调.可通过 UIImage *CreateLaneInfoImageWithLaneInfo(NSString *laneBackInfo, NSString *laneSelectInfo); 方法创建车道信息图片 Callback when lane information needs to be displayed. Lane information images can be created using the UIImage *CreateLaneInfoImageWithLaneInfo(NSString *laneBackInfo, NSString *laneSelectInfo); method. 0-直行; 1-左转; 2-直行和左转; 3-右转; 0-Go straight; 1-Turn left; 2-Go straight and turn left; 3-Turn right; 4-直行和右转; 5-左转掉头; 6-左转和右转; 7-直行和左转和右转; 4-Go straight and turn right; 5-U-turn left; 6-Turn left and right; 7-Go straight, turn left and right; 8-右转掉头; 9-直行和左转掉头; 10-直行和右转掉头; 11-左转和左转掉头; 8-Turn right and make a U-turn; 9-Go straight and make a left U-turn; 10-Go straight and make a right U-turn; 11-Turn left and make a left U-turn; 12-右转和右转掉头; 13-直行左侧道路变宽; 14-左转和左转掉头左侧变宽; 16-直行和左转和左掉头; 12-Turn right and make a right U-turn; 13-The left lane widens when going straight; 14-The left lane widens when turning left and making a left U-turn; 16-Go straight, turn left, and make a left U-turn; 17-右转和左掉头; 18-左转和左掉头和右转; 19-直行和右转和左掉头; 20-左转和右掉头; 21-公交车道; 23-可变车道; 17-Right turn and left U-turn; 18-Left turn and left U-turn and right turn; 19-Straight and right turn and left U-turn; 20-Left turn and right U-turn; 21-Bus lane; 23-Variable lane; 255-只会出现在laneSelectInfo，表示目前规划的路径，不可以走这个车道 255-Only appears in laneSelectInfo, indicating that the currently planned route cannot take this lane
(void) | - driveManagerHideLaneInfo:
| 需要隐藏车道信息时的回调 Callback when lane information needs to be hidden
(void) | - driveManager:updateTrafficStatus:
| 路况光柱信息更新回调 Traffic light bar information update callback
(void) | - driveManager:updateCameraInfos:
| 电子眼信息更新回调 since 5.0.0 Electronic eye information update callback. since 5.0.0
(void) | - driveManager:updateServiceAreaInfos:
| 服务区和收费站信息更新回调 since 5.0.0 Service area and toll station information update callback since 5.0.0
(void) | - driveManager:updateServiceAreaDetailInfos:
| 路线服务区详情列表信息回调，仅当算路成功或主路线更新时回调此方法 since 10.1.0 Route service area detail list information callback, only callback when the route calculation is successful or the main route is updated since 10.1.0
(void) | - driveManager:updateSlopeInfos:
| 导航路线坡度列表信息回调，仅当算路成功或主路线更新时回调此方法 since 10.1.0 Callback for navigation route gradient list information, this method is only called when route calculation succeeds or the main route is updated since 10.1.0
(void) | - driveManager:updateParallelRoadStatus:
| 通知当前是否可以进行平行道路切换，包括主路、辅路以及高架桥上、高架桥下. since 5.3.0 Notify whether parallel road switching is currently possible, including main roads, auxiliary roads, and overpasses and underpasses. since 5.3.0
(void) | - driveManager:updateIntervalCameraWithPositionState:startInfo:endInfo:
| 区间电子眼信息更新回调 since 6.0.0 Interval electronic eye information update callback since 6.0.0
(void) | - driveManager:updateTurnIconImage:turnIconType:
| 导航中的转向图标更新回调 since 6.2.0 Turn icon update callback in navigation since 6.2.0
(void) | - driveManager:updateNextTurnIconImage:nextTurnIconType:
| 导航中相对于当前转向图标，下一个转向图标更新回调 since 6.9.0 Next turn icon update callback relative to current turn icon during navigation. since 6.9.0
(void) | - driveManager:updateBackupRoute:
| 多路线导航模式下的备选路线更新回调, 注意：此函数只有在 driveManager 设置了多路线导航模式才会回调. since 6.3.0 Alternate route update callback in multi-route navigation mode, Note: This function will only be called back if driveManager has set multi-route navigation mode. since 6.3.0
(void) | - driveManager:updateCongestionInfo:
| 前方拥堵区域信息的更新回调. since 7.5.0 Update callback for congestion area information ahead. since 7.5.0
(void) | - driveManager:updateTrafficEvents:
| 交通事件信息的更新回调. since 10.0.920 Update callback of traffic incident information since 10.0.920
(void) | - driveManager:updateTrafficFacilities:
| 巡航道路设施信息更新回调.该更新回调只有在detectedMode开启后有效 Cruise road facility information update callback. This update callback is only effective when detectedMode is enabled
(void) | - driveManager:updateCruiseElecCameraInfos:
| 巡航时自车前方电子眼信息.该更新回调只有在detectedMode开启后有效 since 6.7.0 Electronic eye information in front of the vehicle during cruise. This update callback is only effective when detectedMode is enabled. since 6.7.0
(void) | - driveManager:updateCruiseInfo:
| 巡航信息更新回调.该更新回调只有在detectedMode开启后有效 Cruise information update callback. This update callback is only effective when detectedMode is enabled.
(void) | - driveManager:updateCruiseCongestionInfo:
| 巡航状态下的拥堵区域信息. 该更新回调只有在detectedMode开启后有效 since 6.7.0 Congestion area information during cruise. This update callback is only effective when detectedMode is enabled. since 6.7.0

## Properties
id< AMapNaviDriveViewDelegate > | delegate
id< AMapNaviDriveViewResProxyDelegate > | resProxydelegate
BOOL | canChangeTrackingMode
AMapNaviViewTrackingMode | trackingMode
AMapNaviDriveViewShowMode | showMode
CGPoint | logoCenter
CGSize | logoSize
BOOL | logoEnable
MALogoLanguage | logoLanguage
BOOL | showScale
CGPoint | scaleOrigin
BOOL | showCompass
CGPoint | compassOrigin
CGSize | compassSize
BOOL | mapShowTraffic
CGFloat | mapZoomLevel
BOOL | autoZoomMapLevel
CGFloat | cameraDegree
CGPoint | screenAnchor
NSUInteger | maxRenderFrame
AMapNaviViewMapModeType | mapViewModeType
BOOL | showCamera
BOOL | showTurnArrow
UIColor * | turnArrowColor
CGFloat | turnArrowWidth
BOOL | turnArrowIs3D
UIColor * | turnArrowSideColor
BOOL | showVectorline
BOOL | showTrafficLights
BOOL | showCar
BOOL | showRoute
BOOL | showBackupRoute
BOOL | showGreyAfterPass
CGFloat | lineWidth
MACustomCalloutView * | customCalloutView
UIColor * | dashedLineColor
AMapNaviPolylineGreyColor * | routeGreyColor
NSArray< AMapNaviPolylineTrafficStatusColor * > * | routeStatusColor
BOOL | showEagleMap
BOOL | showCameraDistance
BOOL | showOverSpeedPulse
BOOL | showDriveCongestion
BOOL | showTrafficLightView
BOOL | onlyForGuide
BOOL | showUIElements
BOOL | showCrossImage
BOOL | showTrafficButton
BOOL | showTrafficBar
BOOL | showBrowseRouteButton
BOOL | showMoreButton
CGRect | tmcRouteFrame
NSArray< AMapNaviTMCStatusColor * > * | tmcRouteColor
BOOL | showDriveGuideNaviAnimation
BOOL | showRefreshButton
BOOL | isLandscape
BOOL | autoSwitchShowModeToCarPositionLocked

## Detailed Description

驾车导航界面.该类实现AMapNaviDriveDataRepresentable协议,可通过 AMapNaviDriveManager 的addDataRepresentative:方法进行注册展示驾车导航过程. Driving navigation interface. This class implements the AMapNaviDriveDataRepresentable protocol and can be registered to display the driving navigation process through the addDataRepresentative: method of AMapNaviDriveManager.

## Method Documentation

## ◆ __attribute [1/4]

- (BOOL showTrafficLayer) __attribute |  | ((deprecated("Deprecated, Please use mapShowTraffic combined with -statusTextures: replace. since 7.4.0"))) |  |

是否显示实时交通图层(地图路况+路线路况),默认YES Whether to display real-time traffic layer (map traffic + route traffic), default is YES.

## ◆ __attribute [2/4]

- (BOOL autoSwitchDayNightType) __attribute |  | ((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0"))) |  |

地图是否自动切换白天黑夜模式,默认NO. Does the map automatically switch between day and night mode, default is NO.

## ◆ __attribute [3/4]

- (BOOL showStandardNightType) __attribute |  | ((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0"))) |  |

是否黑夜模式,默认NO. Is it in night mode, default is NO.

## ◆ __attribute [4/4]

- (id< MAMapViewDelegate > mapViewDelegate) __attribute |  | ((deprecated("It is recommended to use the addAnnotaion/addCustomOverlay methods in AMapNaviDriveView for map custom annotations since version 10.0.920"))) |  |

可获得和 MAMapView 原始 Delegate 同样的能力. since 7.0.0 Can obtain the same capabilities as the original Delegate of MAMapView

## ◆ addAnnotation:

- (BOOL) addAnnotation: |  | (AMapNaviCustomAnnotation *) | annotation |

在导航地图中添加自定义标注. since 10.0.920 需要在自定义driveView被此接口addDataRepresentativer添加后调用，否则会添加失败 Add custom annotations to the navigation map. since 10.0.920 This method must be called after the custom driveView is added by the addDataRepresentativer interface, otherwise the addition will fail 注意:生效范围 行前 行中 Note: Effective scope is currently in progress 使用示例: Usage example: AMapNaviCustomAnnotationItemIconModel* iconNormal = [AMapNaviCustomAnnotationItemIconModel new]; iconNormal.image = [UIImage imageNamed: "default_navi_route_startpoint"]; AMapNaviCustomAnnotation *annotaion = [[AMapNaviCustomAnnotation alloc] initWithCoordinate:CLLocationCoordinate2DMake(40.027438, 116.446969) iconModel:iconNormal]; BOOL result = [self.driveView addAnnotation:annotaion]; if (result) { NSLog(@"add succuss"); } annotaion.clickBlock = ^() { NSLog(@"on clicked annotaion:%",annotaion); };

Parameters

  annotation | 具体参考 AMapNaviCustomAnnotation Refer to AMapNaviCustomAnnotation for details

Returns
  返回是否添加成功 Return whether the addition was successful

## ◆ addCustomAnnotation:

- (void) addCustomAnnotation: |  | (AMapNaviCompositeCustomAnnotation *) | annotation |

在导航地图中添加自定义标注. since 6.2.0 Add custom annotations to the navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress

Parameters

  annotation | 具体参考 AMapNaviCompositeCustomAnnotation . Refer to AMapNaviCompositeCustomAnnotation

## ◆ addCustomOverlay:

- (void) addCustomOverlay: |  | (id< AMapNaviCompositeOverlay >_Nonnull) | overlay |

在导航地图中添加自定义overlay. since 6.7.0 Add custom overlay to the navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress

Parameters

  overlay | 具体参考 官方Demo中 DriveViewWithCustomOverlayViewController . For details, refer to the official Demo DriveViewWithCustomOverlayViewController

## ◆ addEventListener:

- (void) addEventListener: |  | (id< AMapNaviDriveViewDelegate >) | aListener |

增加用于接收View回调事件的Listener, 效果等同于delegate. 注意:该方法不会增加实例对象的引用计数(Weak Reference). since 10.1.300

Parameters

  aListener | 实现了 AMapNaviDriveViewDelegate 协议的实例

## ◆ goBackToPlanState

- (BOOL) goBackToPlanState |  |  |

回到行前状态，只有用户初始状态是行前时，且当前是行中时返回YES,其它状态返回NO Return to the pre line state, only when the user's initial state is pre line and the current state is in line, return YES; for other states, return NO

Since
  10.0.820

## ◆ initWithFrame:mapView:

- (instancetype) initWithFrame: |  | (CGRect) | frame
mapView: |  | (MAMapView *) | mapView

创建CarPlay场景的AMapNaviDriveView Create AMapNaviDriveView for CarPlay scenes

- Parameters:
  - frame: 视图frame View frame
  - mapView: CarPlay地图对象 CarPlay map object

Provided by category AMapNaviDriveView(AMapCarPlay).

## ◆ initWithFrame:viewConfig:

- (instancetype) initWithFrame: |  | (CGRect) | frame
viewConfig: |  | (nullable AMapNaviDriveViewConfig *) | config

初始化接口 Initialize interface

Since
  10.0.820

## ◆ removeAnnotation:

- (void) removeAnnotation: |  | (AMapNaviCustomAnnotation *) | annotation |

移除导航地图中的自定义标注. since 10.0.920 Remove custom annotations from the navigation map. since 10.0.920 注意:生效范围 行前 行中 Note: Effective scope is currently in progress

Parameters

  annotation | 自定义标注对象. Custom annotation object.

## ◆ removeCustomAnnotation:

- (void) removeCustomAnnotation: |  | (AMapNaviCompositeCustomAnnotation *) | annotation |

移除导航地图中的自定义标注. since 6.2.0 Remove custom annotations from the navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress

Parameters

  annotation | 具体参考 AMapNaviCompositeCustomAnnotation . Refer to AMapNaviCompositeCustomAnnotation

## ◆ removeCustomOverlay:

- (void) removeCustomOverlay: |  | (id< AMapNaviCompositeOverlay >_Nonnull) | overlay |

移除导航地图中的自定义overlay. since 6.7.0 Remove custom overlay from navigation map 注意:生效范围 行前 行中 Note: Effective scope is currently in progress

Parameters

  overlay | 具体参考 AMapNaviCompositeOverlay . Refer to AMapNaviCompositeOverlay

## ◆ removeEventListener:

- (void) removeEventListener: |  | (id< AMapNaviDriveViewDelegate >) | aListener |

移除用于接收View回调事件的Listener. since 10.1.300

Parameters

  aListener | 实现了 AMapNaviDriveViewDelegate 协议的实例

## ◆ setCameraImage:

- (void) setCameraImage: |  | (nullable UIImage *) | cameraImage |

设置摄像头图标 Set camera icon 注意:与showCamera 相关

Parameters

  cameraImage | 摄像头图标。 Camera icon

## ◆ setCarCompassImage:

- (void) setCarCompassImage: |  | (nullable UIImage *) | carCompassImage |

设置自车罗盘图标 Set vehicle compass icon

Parameters

  carCompassImage | 自车罗盘图标 Vehicle compass icon 注意:与是否显示小车图标 属性相关, 行中生效 Note: Related to whether to display the car icon attribute, effective in the row
  carCompassImage | 自车罗盘图标,设置nil为默认图标 Vehicle compass icon, set nil as default icon

## ◆ setCarImage:

- (void) setCarImage: |  | (nullable UIImage *) | carImage |

设置自车图标 Set vehicle icon

Parameters

  carImage | 自车图标 Vehicle icon 注意:与是否显示小车图标 属性相关 Note: Related to whether the car icon attribute is displayed or not
  carImage | 自车图标,设置nil为默认图标 Car icon, set nil as default icon

## ◆ setCarImageWithSize:

- (void) setCarImageWithSize: |  | (nullable UIImage *) | carImage |

设置自车图标，保持图片大小 与 (void)setCarImage:carImage; 效果一样 Set the ego vehicle icon and maintain the image size Compared to (void) setCarImage: (voidable UIImage *) carImage; The effect is the same

Parameters

  carImage | 自车图标,设置nil为默认图标 Car icon, set nil as default icon

## ◆ setCustomMapStyleOptions:

- (void) setCustomMapStyleOptions: |  | ((deprecated("Custom View no longer supports custom map style. Since 11.1.000"))) | __attribute |

自定义地图样式设置,可以支持分级样式配置,如控制不同级别显示不同的颜色(自7.8.0开始使用新版样式,请到官网(lbs.amap.com)更新新版样式文件,否则无法正常显示路口放大图) Custom map style settings, support hierarchical style configuration, such as controlling different levels to display different colors (starting from version 7.8.0, use the new style, please update the new style file on the official website (lbs.amap.com), otherwise the junction enlargement map cannot be displayed normally)

Parameters

  styleOptions | 自定义样式options. since 6.6.0 Custom style options

## ◆ setEndPointImage:

- (void) setEndPointImage: |  | (nullable UIImage *) | endPointImage |

设置路径终点图标 Set route end point icon

Parameters

  endPointImage | 终点图标 End point icon 注意:生效范围 行前 行中 Note: Effective scope is currently in progress
  endPointImage | 终点图标,设置nil为默认图标 endPointImage destination icon, set nil as default icon

## ◆ setStartPointImage:

- (void) setStartPointImage: |  | (nullable UIImage *) | startPointImage |

设置路径起点图标 Set route start point icon

Parameters

  startPointImage | 起点图标 Start point icon 注意:生效范围 行前 行中 Note: Effective scope is currently in progress
  startPointImage | 起点图标,设置nil为默认图标 Start point icon, set nil as default icon

## ◆ setWayPointImage:

- (void) setWayPointImage: |  | (nullable UIImage *) | wayPointImage |

设置路径途经点图标 Set route waypoint icon

Parameters

  wayPointImage | 途经点图标 Waypoint icon 注意:生效范围 行前 行中
  wayPointImage | 途经点图标,设置nil为默认图标 Waypoint icon, set nil as the default icon

## ◆ updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview

- (void) updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview |  |  |

在全览状态下调用此函数能够让路线显示在可视区域内(排除EdgePadding后剩余的区域)，保证路线不被自定义界面元素遮挡. 比如showUIElements为NO时（自定义界面）横竖屏切换后，可以调用此函数. since 6.2.0 Calling this function in overview mode ensures the route is displayed within the visible area (remaining region after excluding EdgePadding), preventing the route from being obscured by custom UI elements. For example, when showUIElements is set to NO (custom interface), this function can be called after switching between portrait and landscape modes

## Property Documentation

## ◆ autoSwitchShowModeToCarPositionLocked

- (BOOL) autoSwitchShowModeToCarPositionLocked
| read write nonatomic assign

当显示模式为非锁车模式时，是否在7秒后自动设置为锁车模式，默认为NO. since 5.3.0 When the display mode is non-locked mode, whether to automatically set to locked mode after 7 seconds, default is NO 注意:生效范围 行中 Note: Effective scope is currently in progress

## ◆ autoZoomMapLevel

- (BOOL) autoZoomMapLevel
| read write nonatomic assign

锁车模式下是否为了预见下一导航动作自动缩放地图,默认为YES。 since 10.0.2 Whether the map automatically zooms in locked mode to anticipate the next navigation action, default is YES.

## ◆ cameraDegree

- (CGFloat) cameraDegree
| read write nonatomic assign

非锁车状态下地图cameraDegree，锁车态下内部会处理, 默认35.0, 范围[0,60] Map cameraDegree in unlocked state, which will be handled internally when locked, default 35.0, range [0,60]

## ◆ canChangeTrackingMode

- (BOOL) canChangeTrackingMode
| read write nonatomic assign

showMode为普通态时，导航内部是否修改trackingMode，默认为 YES。since 10.1.200 Whether the navigation internally modifies trackingMode when showMode is in normal state, default is YES.

## ◆ compassOrigin

- (CGPoint) compassOrigin
| read write nonatomic assign

指南针原点位置. since 6.3.0 The origin position of the compass

## ◆ compassSize

- (CGSize) compassSize
| read nonatomic assign

指南针的宽高. since 6.3.0 The width and height of the compass

## ◆ customCalloutView

- (MACustomCalloutView*) customCalloutView
| read write nonatomic strong

自定义导航界面自车图标的弹出框view, 设置为nil取消弹框. 注意:弹框功能同MAAnnotationView的customCalloutView, 弹框不会触发 mapView:didAnnotationViewCalloutTapped: 方法. since 5.1.0 Custom pop-up view for the ego vehicle icon in the navigation interface. Set to nil to cancel the pop-up. Note: The pop-up function is the same as MAAnnotationView's customCalloutView, the popup will not trigger the mapView:didAnnotationViewCalloutTapped: method.

## ◆ dashedLineColor

- (UIColor*) dashedLineColor
| read write nonatomic strong

路线虚线部分的颜色. since 6.2.0 The color of the dashed part of the route

## ◆ delegate

- (id<AMapNaviDriveViewDelegate>) delegate
| read write nonatomic weak

实现了 AMapNaviDriveViewDelegate 协议的类指针 Implements the class pointer of the AMapNaviDriveViewDelegate protocol

## ◆ isLandscape

- (BOOL) isLandscape
| read nonatomic assign

目前是否为横屏状态. since 6.2.0 内部会自行监听 UIDeviceOrientationDidChange 进行横竖屏切换，无需再设置此值，但用户要自行保证 AMapNaviDriveView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight，让 AMapNaviDriveView 能够跟着父View一起变化. 可通过回调 -driveView:didChangeOrientation: 获取横竖屏切换时机 Whether it is currently in landscape mode. Since 6.2.0, the system automatically monitors UIDeviceOrientationDidChange for landscape/portrait switching, no need to set this value anymore. However, users must ensure that AMapNaviDriveView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight allows AMapNaviDriveView to change along with the parent View. The timing of screen orientation changes can be obtained through the callback -driveView:didChangeOrientation:

## ◆ lineWidth

- (CGFloat) lineWidth
| read write nonatomic assign

路线polyline的宽度,设置0恢复默认宽度 The width of the route polyline, set to 0 to restore the default width

## ◆ logoCenter

- (CGPoint) logoCenter
| read write nonatomic assign

当前地图Logo位置, 必须在 AMapNaviDriveView.bounds 之内，否则会被忽略. 注意:只有showUIElements为NO时，设置此值才有效. since 6.2.0 The current map logo position must be within AMapNaviDriveView.bounds, otherwise it will be ignored. Note: This setting only takes effect when showUIElements is NO.

## ◆ logoEnable

- (BOOL) logoEnable
| read write nonatomic assign

是否显示logo，仅支持海外包设置，默认NO Whether to display the logo is only supported in overseas packages; the default is NO.

## ◆ logoLanguage

- (MALogoLanguage) logoLanguage
| read write nonatomic assign

设置logo语言。国内包: 支持中文与英文， 默认中文。海外包：仅支持英文，默认英文。 set logo language. Domestic package: supports Chinese and English, default Chinese; Overseas package: supports English only, default English.

## ◆ logoSize

- (CGSize) logoSize
| read nonatomic assign

当前地图Logo的宽高. since 6.2.0 The width and height of the current map logo

## ◆ mapShowTraffic

- (BOOL) mapShowTraffic
| read write nonatomic assign

地图是否显示交通路况，默认YES. since 6.1.0 Whether the map displays traffic conditions, default is YES.

## ◆ mapViewModeType

- (AMapNaviViewMapModeType) mapViewModeType
| read write nonatomic assign

导航界面日夜模式类型, 默认为 AMapNaviViewMapModeTypeDay(白天模式) since 6.7.0 Navigation interface day and night mode types, default is AMapNaviViewMapModeTypeDay (Day mode)

## ◆ mapZoomLevel

- (CGFloat) mapZoomLevel
| read write nonatomic assign

当前地图的zoomLevel，修改zoomLevel会进入非锁车状态 The current zoomLevel of the map, modifying the zoomLevel will enter the unlocked state

## ◆ maxRenderFrame

- (NSUInteger) maxRenderFrame
| read write nonatomic assign

当前地图最大帧数，有效的帧数为：60、30、20、10等能被60整除的数，默认为60. since 6.5.0 The maximum frame rate of the current map, valid frame rates are numbers divisible by 60 such as 60, 30, 20, 10, default is 60

## ◆ onlyForGuide

- (BOOL) onlyForGuide
| read write nonatomic assign

## ◆ resProxydelegate

- (id<AMapNaviDriveViewResProxyDelegate>) resProxydelegate
| read write nonatomic weak

实现了 AMapNaviDriveViewResProxyDelegate 协议的类指针 Implements the class pointer of the AMapNaviDriveViewResProxyDelegate protocol

## ◆ routeGreyColor

- (AMapNaviPolylineGreyColor*) routeGreyColor
| read write nonatomic strong

## ◆ routeStatusColor

- (NSArray<AMapNaviPolylineTrafficStatusColor *>*) routeStatusColor
| read write nonatomic copy

路线的路况颜色，根据AMapNaviRouteStatus配置不同道路状态的颜色 since 10.0.2 The traffic condition colors of the route are configured according to AMapNaviRouteStatus to display different road statuses

## ◆ scaleOrigin

- (CGPoint) scaleOrigin
| read write nonatomic assign

当前地图比例尺的原点位置. 注意:只有showUIElements为NO时，设置此值才有效. The origin position of the current map scale, default is (10,10). Note: This value only takes effect when showUIElements is NO.

## ◆ screenAnchor

- (CGPoint) screenAnchor
| read write nonatomic assign

地图的视图锚点. (0, 0)为左上角，(1, 1)为右下角. 可通过设置此值来改变自车图标的默认显示位置. 注意:只有showUIElements为NO时，设置此值才有效 since 6.2.0 The view anchor point of the map. (0, 0) is the top-left corner, (1, 1) is the bottom-right corner. You can change the default display position of the self-vehicle icon by setting this value. Note: This value only takes effect when showUIElements is NO.

## ◆ showBackupRoute

- (BOOL) showBackupRoute
| read write nonatomic assign

多路线导航模式下是否显示备选路线, 默认YES. since 6.7.0 Whether to display alternative routes in multi-route navigation mode, default is YES.

## ◆ showBrowseRouteButton

- (BOOL) showBrowseRouteButton
| read write nonatomic assign

是否显示全览按钮,默认YES Whether to display overview button, default is YES

## ◆ showCamera

- (BOOL) showCamera
| read write nonatomic assign

路线上是否显示摄像头,默认YES Whether to display cameras on the route, default is YES.

## ◆ showCameraDistance

- (BOOL) showCameraDistance
| read write nonatomic assign

是否显示电子眼的距离，默认为NO。since 10.0.2 Whether to display the distance of electronic eyes, default is NO.

## ◆ showCar

- (BOOL) showCar
| read write nonatomic assign

是否显示小车图标,默认YES. since 6.2.0 Whether to display the car icon, default is YES.

## ◆ showCompass

- (BOOL) showCompass
| read write nonatomic assign

是否显示指南针,默认NO Whether to display the compass, default is NO

## ◆ showCrossImage

- (BOOL) showCrossImage
| read write nonatomic assign

是否显示路口放大图，默认YES Whether to display junction zoom, default is YES

## ◆ showDriveCongestion

- (BOOL) showDriveCongestion
| read write nonatomic assign

路线上是否显示拥堵气泡，默认YES。 since 10.0.5 Whether to display congestion bubbles on the route, default is YES.

## ◆ showDriveGuideNaviAnimation

- (BOOL) showDriveGuideNaviAnimation
| read write nonatomic assign

是否执行驾车导航动画开关，包括：转场动画和导航态动画。since 10.1.111 Whether to enable the driving navigation animation switch, including: transition animation and navigation state animation

## ◆ showEagleMap

- (BOOL) showEagleMap
| read write nonatomic assign

## ◆ showGreyAfterPass

- (BOOL) showGreyAfterPass
| read write nonatomic assign

走过的路线是否置灰,默认为NO. since 6.2.0 Whether to gray out the traveled route, default is NO

## ◆ showMode

- (AMapNaviDriveViewShowMode) showMode
| read write nonatomic assign

导航界面显示模式,默认AMapNaviDriveViewShowModeCarPositionLocked Navigation interface display mode, default is AMapNaviDriveViewShowModeCarPositionLocked 注意: 生效范围 行中 Note: Effective scope in row

## ◆ showMoreButton

- (BOOL) showMoreButton
| read write nonatomic assign

是否显示更多按钮,默认YES Whether to show more buttons, default is YES

## ◆ showOverSpeedPulse

- (BOOL) showOverSpeedPulse
| read write nonatomic assign

是否显示超速脉冲，默认为NO。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/。since 10.0.2 Whether to display speeding pulses, default is NO. 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/

## ◆ showRefreshButton

- (BOOL) showRefreshButton
| read write nonatomic assign

是否显示刷新按钮,默认YES Whether to display refresh button, default is YES

## ◆ showRoute

- (BOOL) showRoute
| read write nonatomic assign

是否显示路线,默认YES. 注意：路线上的相关信息，如摄像头(showCamera)、红绿灯(showTrafficLights)、转向箭头(showTurnArrow)、牵引线(showVectorline)、起终点等也会一同受控制，进行显示和隐藏. since 6.2.0 Whether to display the route, default is YES. Note: relevant information on the route, such as cameras (showCamera), traffic lights (showTrafficLights), turning arrows (showTurnArrow), traction lines (showVectorline), start and end points, etc., will also be controlled to display and hide

## ◆ showScale

- (BOOL) showScale
| read write nonatomic assign

当前地图是否显示比例尺，默认NO. 注意:只有showUIElements为NO时，设置此值才有效. Whether the current map displays the scale, default is NO. Note: This value only takes effect when showUIElements is NO.

## ◆ showTrafficBar

- (BOOL) showTrafficBar
| read write nonatomic assign

是否显示路况光柱图,默认YES Whether to display traffic light column, default is YES

## ◆ showTrafficButton

- (BOOL) showTrafficButton
| read write nonatomic assign

是否显示实时交通按钮,默认YES Whether to display real-time traffic button, default is YES

## ◆ showTrafficLights

- (BOOL) showTrafficLights
| read write nonatomic assign

是否显示红绿灯图标,默认YES. since 6.2.0 Whether to display the traffic light icon, default is YES

## ◆ showTrafficLightView

- (BOOL) showTrafficLightView
| read write nonatomic assign

路线上是否显示红绿灯倒计时，开启付费权限时默认YES。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/。since 10.0.5 Whether to display traffic light countdown on the route, default is YES when paid permissions are enabled. 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/ 路线上是否显示红绿灯倒计时，开启付费权限时默认YES。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/。since 10.0.5 Whether the countdown of traffic lights is displayed on the route, and the default is YES when the payment permission is enabled. Special note: The current interface is a charging interface. If you apply for trial or formal application, please submit a business cooperation work order through the work order system for communication https://lbs.amap.com/ 。since 10.0.5 注意:生效范围 行中 Note: Effective scope is currently in progress

## ◆ showTurnArrow

- (BOOL) showTurnArrow
| read write nonatomic assign

路线上是否显示转向箭头,默认YES Whether to display turn arrows on the route, default is YES.

## ◆ showUIElements

- (BOOL) showUIElements
| read write nonatomic assign

是否显示界面元素,默认YES Whether to display interface elements, default is YES

## ◆ showVectorline

- (BOOL) showVectorline
| read write nonatomic assign

是否显示牵引线,默认YES. since 6.2.0 Whether to display the traction line, default is YES

## ◆ tmcRouteColor

- (NSArray<AMapNaviTMCStatusColor *>*) tmcRouteColor
| read write nonatomic copy

光柱图颜色，根据AMapNaviRouteStatus配置不同道路状态的颜色，AMapNaviRouteStatusUnknow 的可以不做配置。since 10.0.2 Beam chart color, configure colors for different road statuses according to AMapNaviRouteStatus, AMapNaviRouteStatusUnknow can be left unconfigured

## ◆ tmcRouteFrame

- (CGRect) tmcRouteFrame
| read write nonatomic assign

光柱图位置。since 10.0.2 Beam chart position

## ◆ trackingMode

- (AMapNaviViewTrackingMode) trackingMode
| read write nonatomic assign

导航界面跟随模式,默认AMapNaviViewTrackingModeCarNorth Navigation interface follow mode, default is AMapNaviViewTrackingModeCarNorth

## ◆ turnArrowColor

- (UIColor*) turnArrowColor
| read write nonatomic strong

路线上转弯箭头颜色. since 6.1.0 The color of the turn arrows on the route

## ◆ turnArrowIs3D

- (BOOL) turnArrowIs3D
| read write nonatomic assign

路线上转弯箭头是否为3D箭头线,默认为YES. since 6.6.0 Whether the turning arrow on the route is a 3D arrow line, default is YES.

## ◆ turnArrowSideColor

- (UIColor*) turnArrowSideColor
| read write nonatomic strong

路线上转弯箭头设置3D箭头的侧边颜色（当turnArrowIs3D为YES时有效). since 6.6.0 Set the side color of the 3D arrow for the turning arrow on the route (effective when turnArrowIs3D is YES)

## ◆ turnArrowWidth

- (CGFloat) turnArrowWidth
| read write nonatomic assign

路线上转弯箭头的宽度,设置0恢复默认宽度. since 6.2.0 The width of the turn arrows on the route, set to 0 to restore the default width

The documentation for this class was generated from the following file:

- AMapNaviDriveView.h

© 2017 高德信息技术有限公司 版权所有，保留所有权利。