高德地图SDK(导航)  V11.1.000
AMapNaviDriveView.h
Go to the documentation of this file.
1 //
2 // AMapNaviDriveView.h
3 // AMapNaviKit
4 //
5 // Created by AutoNavi on 15/12/28.
6 // Copyright © 2016年 Amap. All rights reserved.
7 //
8 
10 #import "AMapNaviCommonObj.h"
14 
15 NS_ASSUME_NONNULL_BEGIN
16 
19 
23 
28 - (instancetype)initWithFrame:(CGRect)frame viewConfig:(nullable AMapNaviDriveViewConfig *)config;
29 
30 
31 #pragma mark - Delegate
32 
35 @property (nonatomic, weak) id<AMapNaviDriveViewDelegate> delegate;
36 
39 @property (nonatomic, weak) id<AMapNaviDriveViewResProxyDelegate> resProxydelegate;
40 
43 @property (nonatomic, weak) 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")));;
44 
45 #pragma mark - Mode Options
46 
49 @property (nonatomic, assign) BOOL canChangeTrackingMode;
50 
54 @property (nonatomic, assign) AMapNaviViewTrackingMode trackingMode;
55 
60 @property (nonatomic, assign) AMapNaviDriveViewShowMode showMode;
61 
62 
63 #pragma mark - Map Options
64 
67 @property (nonatomic, assign) CGPoint logoCenter;
68 
71 @property (nonatomic, assign, readonly) CGSize logoSize;
72 
75 @property (nonatomic, assign) BOOL showScale;
76 
79 @property (nonatomic, assign) CGPoint scaleOrigin;
80 
83 @property (nonatomic, assign) BOOL showCompass;
84 
87 @property (nonatomic, assign) CGPoint compassOrigin;
88 
91 @property (nonatomic, assign, readonly) CGSize compassSize;
92 
95 @property (nonatomic, assign) BOOL mapShowTraffic;
96 
99 @property (nonatomic, assign) CGFloat mapZoomLevel;
100 
103 @property (nonatomic, assign) BOOL autoZoomMapLevel;
104 
107 @property (nonatomic, assign) CGFloat cameraDegree;
108 
111 @property (nonatomic, assign) CGPoint screenAnchor;
112 
115 @property (nonatomic, assign) NSUInteger maxRenderFrame;
116 
119 @property (nonatomic, assign) AMapNaviViewMapModeType mapViewModeType;
120 
127 - (void)setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions __attribute((deprecated("Custom View no longer supports custom map style. Since 11.1.000")));
128 
131 @property (nonatomic, assign) BOOL autoSwitchDayNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")));
132 
135 @property (nonatomic, assign) BOOL showStandardNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")));
136 
137 #pragma mark - Annoation Options and Overlay Options
138 
141 @property (nonatomic, assign) BOOL showTrafficLayer __attribute((deprecated("Deprecated, Please use mapShowTraffic combined with -statusTextures: replace. since 7.4.0")));
142 
145 @property (nonatomic, assign) BOOL showCamera;
146 
149 @property (nonatomic, assign) BOOL showTurnArrow;
150 
153 @property (nonatomic, strong) UIColor *turnArrowColor;
154 
157 @property (nonatomic, assign) CGFloat turnArrowWidth;
158 
161 @property (nonatomic, assign) BOOL turnArrowIs3D;
162 
165 @property (nonatomic, strong) UIColor *turnArrowSideColor;
166 
169 @property (nonatomic, assign) BOOL showVectorline;
170 
173 @property (nonatomic, assign) BOOL showTrafficLights;
174 
177 @property (nonatomic, assign) BOOL showCar;
178 
181 @property (nonatomic, assign) BOOL showRoute;
182 
185 @property (nonatomic, assign) BOOL showBackupRoute;
186 
189 @property (nonatomic, assign) BOOL showGreyAfterPass;
190 
193 @property (nonatomic, assign) CGFloat lineWidth;
194 
197 @property (nonatomic, strong, nullable) MACustomCalloutView *customCalloutView;
198 
201 @property (nonatomic, strong) UIColor *dashedLineColor;
202 
203 // 路线走过后置灰的颜色 since 10.0.2
204 //The color of the route after it has been traveled and grayed out
205 @property (nonatomic, strong) AMapNaviPolylineGreyColor *routeGreyColor;
206 
209 @property (nonatomic, copy) NSArray<AMapNaviPolylineTrafficStatusColor *> *routeStatusColor;
210 
211 //设置自定义View是否显示鹰眼地图,默认为NO。显示鹰眼小地图的时候,光柱图和全览按钮隐藏。 特别注意:当前接口为收费接口,您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/。since 10.0.2
212 //Set whether the custom View displays the overview map, default is NO. When the overview mini-map is displayed, the light bar chart and overview button are hidden. 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/
213 @property (nonatomic, assign) BOOL showEagleMap;
214 
217 @property (nonatomic, assign) BOOL showCameraDistance;
218 
221 @property (nonatomic, assign) BOOL showOverSpeedPulse;
222 
225 @property (nonatomic, assign) BOOL showDriveCongestion;
226 
229 
234 
235 @property (nonatomic, assign) BOOL showTrafficLightView;
236 
244 - (void)setCameraImage:(nullable UIImage *)cameraImage;
245 
256 - (void)setStartPointImage:(nullable UIImage *)startPointImage;
257 
267 - (void)setWayPointImage:(nullable UIImage *)wayPointImage;
268 
279 - (void)setEndPointImage:(nullable UIImage *)endPointImage;
280 
291 - (void)setCarImage:(nullable UIImage *)carImage;
292 
300 - (void)setCarImageWithSize:(nullable UIImage *)carImage;
301 
312 - (void)setCarCompassImage:(nullable UIImage *)carCompassImage;
313 
338 - (BOOL)addAnnotation:(AMapNaviCustomAnnotation *)annotation;
339 
348 - (void)removeAnnotation:(AMapNaviCustomAnnotation *)annotation;
349 
358 - (void)addCustomAnnotation:(AMapNaviCompositeCustomAnnotation *)annotation;
359 
368 - (void)removeCustomAnnotation:(AMapNaviCompositeCustomAnnotation *)annotation;
369 
378 - (void)addCustomOverlay:(id <AMapNaviCompositeOverlay>_Nonnull)overlay;
379 
388 - (void)removeCustomOverlay:(id <AMapNaviCompositeOverlay>_Nonnull)overlay;
389 
390 #pragma mark - UI Element Options
391 
394 @property (nonatomic, assign) BOOL showUIElements;
395 
398 @property (nonatomic, assign) BOOL showCrossImage;
399 
402 @property (nonatomic, assign) BOOL showTrafficButton;
403 
406 @property (nonatomic, assign) BOOL showTrafficBar;
407 
410 @property (nonatomic, assign) BOOL showBrowseRouteButton;
411 
414 @property (nonatomic, assign) BOOL showMoreButton;
415 
418 @property (nonatomic, assign) CGRect tmcRouteFrame;
419 
422 @property (nonatomic, copy) NSArray<AMapNaviTMCStatusColor *> *tmcRouteColor;
423 
426 @property (nonatomic, assign) BOOL showDriveGuideNaviAnimation;
427 
428 #pragma mark - Other
429 
432 @property (nonatomic, assign, readonly) BOOL isLandscape;
433 
438 @property (nonatomic, assign) BOOL autoSwitchShowModeToCarPositionLocked;
439 
445 
446 
452 - (BOOL)goBackToPlanState;
453 
454 @end
455 
456 @protocol AMapNaviDriveViewDelegate <NSObject>
457 @optional
458 
465 - (void)driveViewCloseButtonClicked:(AMapNaviDriveView *)driveView;
466 
473 - (void)driveViewMoreButtonClicked:(AMapNaviDriveView *)driveView;
474 
481 - (void)driveViewTrunIndicatorViewTapped:(AMapNaviDriveView *)driveView;
482 
491 - (void)driveView:(AMapNaviDriveView *)driveView didChangeShowMode:(AMapNaviDriveViewShowMode)showMode;
492 
501 - (void)driveView:(AMapNaviDriveView *)driveView didChangeTrackingMode:(AMapNaviViewTrackingMode)trackMode;
502 
509 - (void)driveViewTrackingModeAnimationFinished:(AMapNaviDriveView *)driveView;
510 
521 - (void)driveView:(AMapNaviDriveView *)driveView didChangeOrientation:(BOOL)isLandscape;
522 
531 - (void)driveView:(AMapNaviDriveView *)driveView didChangeDayNightType:(BOOL)showStandardNightType;
532 
541 - (UIEdgeInsets)driveViewEdgePadding:(AMapNaviDriveView *)driveView;
542 
543 
551 - (void)driveViewOnSearchBarBackClicked:(AMapNaviDriveView *)driveView;
552 
562 - (void)driveView:(AMapNaviDriveView *)driveView onDriveStrategyChanged:(AMapNaviDrivingStrategy)driveStrategy;
563 
571 - (void)driveView:(AMapNaviDriveView *)driveView didChangeBroadcastType:(AMapNaviCompositeBroadcastType)type;
572 
573 
581 - (void)driveView:(AMapNaviDriveView *)driveView didChangeAutoZoomMapLevel:(BOOL)autoZoomMapLevel;
582 
590 - (void)driveView:(AMapNaviDriveView *)driveView didChangeMapViewModeType:(AMapNaviViewMapModeType)type;
591 
592 
601 - (void)driveView:(AMapNaviDriveView *)driveView didChangeShowEagleMap:(BOOL)show;
602 
609 - (void)driveView:(AMapNaviDriveView *)view didChangeToState:(AMapNaviDriveViewState)state;
610 
620 - (void)driveView:(AMapNaviDriveView *)driveView asyncScreenShot:(UIImage *)image state:(NSInteger)state;
621 
634 - (void)driveView:(AMapNaviDriveView *)driveView onInputChange:(NSString *)inputText callBack:(void (^)(NSArray<AMapNaviInputTip *> *tips))callback;
635 
645 - (void)driveView:(AMapNaviDriveView *)driveView updateRemainServiceAreaDetailInfos:(nullable NSArray<AMapNaviServiceAreaDetailInfo *> *)remainServiceAreaDetails;
646 
655 - (void)driveView:(AMapNaviDriveView *)driveView onRouteHighlightChange:(NSInteger)pathId triggerType:(NSInteger)triggerType;
656 
657 @end
658 
659 #pragma mark - AMapNaviDriveViewResProxyDelegate
661 @optional
672 - (UIImage *)getResourceFromExternal:(NSString *)resUrl;
673 
674 @end
675 
676 NS_ASSUME_NONNULL_END
AMapNaviViewTrackingMode
Definition: AMapNaviCommonObj.h:47
AMapNaviViewMapModeType
Definition: AMapNaviCommonObj.h:472
AMapNaviDrivingStrategy
Definition: AMapNaviCommonObj.h:72
AMapNaviDriveViewShowMode
Definition: AMapNaviCommonObj.h:55
AMapNaviDriveViewState
Definition: AMapNaviDriveViewConfig.h:16
导航界面自定义标注 Custom annotations in the navigation interface since 5.5.0
Definition: AMapNaviCompositeAnnotation.h:31
Definition: AMapNaviCompositeAnnotation.h:87
Definition: AMapNaviDriveViewConfig.h:25
Definition: AMapNaviDriveView.h:22
NSUInteger maxRenderFrame
Definition: AMapNaviDriveView.h:115
BOOL showVectorline
Definition: AMapNaviDriveView.h:169
BOOL showTrafficButton
Definition: AMapNaviDriveView.h:402
CGPoint logoCenter
Definition: AMapNaviDriveView.h:67
BOOL autoZoomMapLevel
Definition: AMapNaviDriveView.h:103
void updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview()
在全览状态下调用此函数能够让路线显示在可视区域内(排除EdgePadding后剩余的区域),保证路线不被自定义界面元素遮挡. 比如showUIElements为NO时(自定义界面)横竖屏切换后,可以调用...
CGSize compassSize
Definition: AMapNaviDriveView.h:91
BOOL goBackToPlanState()
回到行前状态,只有用户初始状态是行前时,且当前是行中时返回YES,其它状态返回NO Return to the pre line state, only when the user's initial ...
UIColor * dashedLineColor
Definition: AMapNaviDriveView.h:201
CGPoint scaleOrigin
Definition: AMapNaviDriveView.h:79
BOOL showEagleMap
Definition: AMapNaviDriveView.h:213
AMapNaviViewTrackingMode trackingMode
Definition: AMapNaviDriveView.h:54
AMapNaviDriveViewShowMode showMode
Definition: AMapNaviDriveView.h:60
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")))
BOOL showGreyAfterPass
Definition: AMapNaviDriveView.h:189
NSArray< AMapNaviPolylineTrafficStatusColor * > * routeStatusColor
Definition: AMapNaviDriveView.h:209
BOOL canChangeTrackingMode
Definition: AMapNaviDriveView.h:43
BOOL showTrafficLayer __attribute((deprecated("Deprecated, Please use mapShowTraffic combined with -statusTextures: replace. since 7.4.0")))
BOOL mapShowTraffic
Definition: AMapNaviDriveView.h:95
BOOL showCar
Definition: AMapNaviDriveView.h:177
CGRect tmcRouteFrame
Definition: AMapNaviDriveView.h:418
BOOL showOverSpeedPulse
Definition: AMapNaviDriveView.h:221
BOOL autoSwitchShowModeToCarPositionLocked
Definition: AMapNaviDriveView.h:438
BOOL showBackupRoute
Definition: AMapNaviDriveView.h:185
id< AMapNaviDriveViewDelegate > delegate
Definition: AMapNaviDriveView.h:35
BOOL showMoreButton
Definition: AMapNaviDriveView.h:414
BOOL showBrowseRouteButton
Definition: AMapNaviDriveView.h:410
MACustomCalloutView * customCalloutView
Definition: AMapNaviDriveView.h:197
BOOL showCrossImage
Definition: AMapNaviDriveView.h:398
BOOL showRoute
Definition: AMapNaviDriveView.h:181
NSArray< AMapNaviTMCStatusColor * > * tmcRouteColor
Definition: AMapNaviDriveView.h:422
CGFloat cameraDegree
Definition: AMapNaviDriveView.h:107
AMapNaviPolylineGreyColor * routeGreyColor
Definition: AMapNaviDriveView.h:205
BOOL autoSwitchDayNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")))
CGFloat mapZoomLevel
Definition: AMapNaviDriveView.h:99
BOOL showUIElements
Definition: AMapNaviDriveView.h:394
BOOL showDriveCongestion
Definition: AMapNaviDriveView.h:225
BOOL showTrafficLightView
Definition: AMapNaviDriveView.h:235
CGPoint compassOrigin
Definition: AMapNaviDriveView.h:87
BOOL showTrafficLights
Definition: AMapNaviDriveView.h:173
BOOL showScale
Definition: AMapNaviDriveView.h:75
CGFloat lineWidth
Definition: AMapNaviDriveView.h:193
BOOL isLandscape
Definition: AMapNaviDriveView.h:432
BOOL turnArrowIs3D
Definition: AMapNaviDriveView.h:161
UIColor * turnArrowColor
Definition: AMapNaviDriveView.h:153
BOOL showStandardNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")))
CGSize logoSize
Definition: AMapNaviDriveView.h:71
AMapNaviViewMapModeType mapViewModeType
Definition: AMapNaviDriveView.h:119
BOOL showTurnArrow
Definition: AMapNaviDriveView.h:149
CGPoint screenAnchor
Definition: AMapNaviDriveView.h:111
CGFloat turnArrowWidth
Definition: AMapNaviDriveView.h:157
id< AMapNaviDriveViewResProxyDelegate > resProxydelegate
Definition: AMapNaviDriveView.h:39
BOOL showCompass
Definition: AMapNaviDriveView.h:83
BOOL showTrafficBar
Definition: AMapNaviDriveView.h:406
UIColor * turnArrowSideColor
Definition: AMapNaviDriveView.h:165
BOOL showCameraDistance
Definition: AMapNaviDriveView.h:217
BOOL showCamera
Definition: AMapNaviDriveView.h:145
BOOL showDriveGuideNaviAnimation
Definition: AMapNaviDriveView.h:426
Definition: AMapNaviCommonObj.h:1641
Definition: AMapNaviCommonObj.h:1483
Definition: AMapNaviCommonObj.h:1738
Definition: MACustomCalloutView.h:15
Definition: MAMapCustomStyleOptions.h:12
Definition: AMapNaviCompositeAnnotation.h:14
AMapNaviDriveDataRepresentable协议.实例对象可以通过实现该协议,并将其通过 AMapNaviDriveManager 的addDataRepresentative:方法进行...
Definition: AMapNaviDriveDataRepresentable.h:27
Definition: AMapNaviDriveView.h:456
Definition: AMapNaviDriveView.h:660
© 2017 高德信息技术有限公司 版权所有,保留所有权利。