高德地图SDK(导航) V11.2.000
Loading...
Searching...
No Matches
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
15NS_ASSUME_NONNULL_BEGIN
16
17@protocol AMapNaviDriveViewDelegate;
18@protocol AMapNaviDriveViewResProxyDelegate;
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
41- (void)addEventListener:(id<AMapNaviDriveViewDelegate>)aListener;
42
47- (void)removeEventListener:(id<AMapNaviDriveViewDelegate>)aListener;
48
51@property (nonatomic, weak) id<AMapNaviDriveViewResProxyDelegate> resProxydelegate;
52
55@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")));;
56
57#pragma mark - Mode Options
58
61@property (nonatomic, assign) BOOL canChangeTrackingMode;
62
66@property (nonatomic, assign) AMapNaviViewTrackingMode trackingMode;
67
72@property (nonatomic, assign) AMapNaviDriveViewShowMode showMode;
73
74
75#pragma mark - Map Options
76
79@property (nonatomic, assign) CGPoint logoCenter;
80
83@property (nonatomic, assign, readonly) CGSize logoSize;
84
87@property (nonatomic, assign) BOOL logoEnable;
88
93@property (nonatomic, assign) MALogoLanguage logoLanguage;
94
97@property (nonatomic, assign) BOOL showScale;
98
101@property (nonatomic, assign) CGPoint scaleOrigin;
102
105@property (nonatomic, assign) BOOL showCompass;
106
109@property (nonatomic, assign) CGPoint compassOrigin;
110
113@property (nonatomic, assign, readonly) CGSize compassSize;
114
117@property (nonatomic, assign) BOOL mapShowTraffic;
118
121@property (nonatomic, assign) CGFloat mapZoomLevel;
122
125@property (nonatomic, assign) BOOL autoZoomMapLevel;
126
129@property (nonatomic, assign) CGFloat cameraDegree;
130
133@property (nonatomic, assign) CGPoint screenAnchor;
134
137@property (nonatomic, assign) NSUInteger maxRenderFrame;
138
141@property (nonatomic, assign) AMapNaviViewMapModeType mapViewModeType;
142
149- (void)setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions __attribute((deprecated("Custom View no longer supports custom map style. Since 11.1.000")));
150
153@property (nonatomic, assign) BOOL autoSwitchDayNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")));
154
157@property (nonatomic, assign) BOOL showStandardNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")));
158
159#pragma mark - Annoation Options and Overlay Options
160
163@property (nonatomic, assign) BOOL showTrafficLayer __attribute((deprecated("Deprecated, Please use mapShowTraffic combined with -statusTextures: replace. since 7.4.0")));
164
167@property (nonatomic, assign) BOOL showCamera;
168
171@property (nonatomic, assign) BOOL showTurnArrow;
172
175@property (nonatomic, strong) UIColor *turnArrowColor;
176
179@property (nonatomic, assign) CGFloat turnArrowWidth;
180
183@property (nonatomic, assign) BOOL turnArrowIs3D;
184
187@property (nonatomic, strong) UIColor *turnArrowSideColor;
188
191@property (nonatomic, assign) BOOL showVectorline;
192
195@property (nonatomic, assign) BOOL showTrafficLights;
196
199@property (nonatomic, assign) BOOL showCar;
200
203@property (nonatomic, assign) BOOL showRoute;
204
207@property (nonatomic, assign) BOOL showBackupRoute;
208
211@property (nonatomic, assign) BOOL showGreyAfterPass;
212
215@property (nonatomic, assign) CGFloat lineWidth;
216
219@property (nonatomic, strong, nullable) MACustomCalloutView *customCalloutView;
220
223@property (nonatomic, strong) UIColor *dashedLineColor;
224
225// 路线走过后置灰的颜色 since 10.0.2
226//The color of the route after it has been traveled and grayed out
227@property (nonatomic, strong) AMapNaviPolylineGreyColor *routeGreyColor;
228
231@property (nonatomic, copy) NSArray<AMapNaviPolylineTrafficStatusColor *> *routeStatusColor;
232
233//设置自定义View是否显示鹰眼地图,默认为NO。显示鹰眼小地图的时候,光柱图和全览按钮隐藏。 特别注意:当前接口为收费接口,您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/。since 10.0.2
234//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/
235@property (nonatomic, assign) BOOL showEagleMap;
236
239@property (nonatomic, assign) BOOL showCameraDistance;
240
243@property (nonatomic, assign) BOOL showOverSpeedPulse;
244
247@property (nonatomic, assign) BOOL showDriveCongestion;
248
251
256
257@property (nonatomic, assign) BOOL showTrafficLightView;
258
259//纯导航模式使用
260@property(nonatomic, assign) BOOL onlyForGuide;
261
269- (void)setCameraImage:(nullable UIImage *)cameraImage;
270
281- (void)setStartPointImage:(nullable UIImage *)startPointImage;
282
292- (void)setWayPointImage:(nullable UIImage *)wayPointImage;
293
304- (void)setEndPointImage:(nullable UIImage *)endPointImage;
305
316- (void)setCarImage:(nullable UIImage *)carImage;
317
325- (void)setCarImageWithSize:(nullable UIImage *)carImage;
326
337- (void)setCarCompassImage:(nullable UIImage *)carCompassImage;
338
363- (BOOL)addAnnotation:(AMapNaviCustomAnnotation *)annotation;
364
373- (void)removeAnnotation:(AMapNaviCustomAnnotation *)annotation;
374
383- (void)addCustomAnnotation:(AMapNaviCompositeCustomAnnotation *)annotation;
384
393- (void)removeCustomAnnotation:(AMapNaviCompositeCustomAnnotation *)annotation;
394
403- (void)addCustomOverlay:(id <AMapNaviCompositeOverlay>_Nonnull)overlay;
404
413- (void)removeCustomOverlay:(id <AMapNaviCompositeOverlay>_Nonnull)overlay;
414
415#pragma mark - UI Element Options
416
419@property (nonatomic, assign) BOOL showUIElements;
420
423@property (nonatomic, assign) BOOL showCrossImage;
424
427@property (nonatomic, assign) BOOL showTrafficButton;
428
431@property (nonatomic, assign) BOOL showTrafficBar;
432
435@property (nonatomic, assign) BOOL showBrowseRouteButton;
436
439@property (nonatomic, assign) BOOL showMoreButton;
440
443@property (nonatomic, assign) CGRect tmcRouteFrame;
444
447@property (nonatomic, copy) NSArray<AMapNaviTMCStatusColor *> *tmcRouteColor;
448
451@property (nonatomic, assign) BOOL showDriveGuideNaviAnimation;
452
455@property (nonatomic, assign) BOOL showRefreshButton;
456
457#pragma mark - Other
458
461@property (nonatomic, assign, readonly) BOOL isLandscape;
462
467@property (nonatomic, assign) BOOL autoSwitchShowModeToCarPositionLocked;
468
474
475
481- (BOOL)goBackToPlanState;
482
483@end
484
485@protocol AMapNaviDriveViewDelegate <NSObject>
486@optional
487
494- (void)driveViewCloseButtonClicked:(AMapNaviDriveView *)driveView;
495
502- (void)driveViewMoreButtonClicked:(AMapNaviDriveView *)driveView;
503
510- (void)driveViewTrunIndicatorViewTapped:(AMapNaviDriveView *)driveView;
511
520- (void)driveView:(AMapNaviDriveView *)driveView didChangeShowMode:(AMapNaviDriveViewShowMode)showMode;
521
530- (void)driveView:(AMapNaviDriveView *)driveView didChangeTrackingMode:(AMapNaviViewTrackingMode)trackMode;
531
538- (void)driveViewTrackingModeAnimationFinished:(AMapNaviDriveView *)driveView;
539
550- (void)driveView:(AMapNaviDriveView *)driveView didChangeOrientation:(BOOL)isLandscape;
551
560- (void)driveView:(AMapNaviDriveView *)driveView didChangeDayNightType:(BOOL)showStandardNightType;
561
570- (UIEdgeInsets)driveViewEdgePadding:(AMapNaviDriveView *)driveView;
571
572
580- (void)driveViewOnSearchBarBackClicked:(AMapNaviDriveView *)driveView;
581
591- (void)driveView:(AMapNaviDriveView *)driveView onDriveStrategyChanged:(AMapNaviDrivingStrategy)driveStrategy;
592
600- (void)driveView:(AMapNaviDriveView *)driveView didChangeBroadcastType:(AMapNaviCompositeBroadcastType)type;
601
602
610- (void)driveView:(AMapNaviDriveView *)driveView didChangeAutoZoomMapLevel:(BOOL)autoZoomMapLevel;
611
619- (void)driveView:(AMapNaviDriveView *)driveView didChangeMapViewModeType:(AMapNaviViewMapModeType)type;
620
621
630- (void)driveView:(AMapNaviDriveView *)driveView didChangeShowEagleMap:(BOOL)show;
631
638- (void)driveView:(AMapNaviDriveView *)view didChangeToState:(AMapNaviDriveViewState)state;
639
649- (void)driveView:(AMapNaviDriveView *)driveView asyncScreenShot:(UIImage *)image state:(NSInteger)state;
650
663- (void)driveView:(AMapNaviDriveView *)driveView onInputChange:(NSString *)inputText callBack:(void (^)(NSArray<AMapNaviInputTip *> *tips))callback;
664
674- (void)driveView:(AMapNaviDriveView *)driveView updateRemainServiceAreaDetailInfos:(nullable NSArray<AMapNaviServiceAreaDetailInfo *> *)remainServiceAreaDetails;
675
684- (void)driveView:(AMapNaviDriveView *)driveView onRouteHighlightChange:(NSInteger)pathId triggerType:(NSInteger)triggerType;
685
686@end
687
688#pragma mark - AMapNaviDriveViewResProxyDelegate
689@protocol AMapNaviDriveViewResProxyDelegate <NSObject>
690@optional
701- (UIImage *)getResourceFromExternal:(NSString *)resUrl;
702
703@end
704
705NS_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
MALogoLanguage
Definition MAMapView.h:64
导航界面自定义标注 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:137
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")))
MALogoLanguage logoLanguage
Definition AMapNaviDriveView.h:93
BOOL showVectorline
Definition AMapNaviDriveView.h:191
BOOL showTrafficButton
Definition AMapNaviDriveView.h:427
CGPoint logoCenter
Definition AMapNaviDriveView.h:79
BOOL autoZoomMapLevel
Definition AMapNaviDriveView.h:125
void updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview()
在全览状态下调用此函数能够让路线显示在可视区域内(排除EdgePadding后剩余的区域),保证路线不被自定义界面元素遮挡. 比如showUIElements为NO时(自定义界面)横竖屏切换后,可以调用...
CGSize compassSize
Definition AMapNaviDriveView.h:113
BOOL goBackToPlanState()
回到行前状态,只有用户初始状态是行前时,且当前是行中时返回YES,其它状态返回NO Return to the pre line state, only when the user's initial ...
UIColor * dashedLineColor
Definition AMapNaviDriveView.h:223
CGPoint scaleOrigin
Definition AMapNaviDriveView.h:101
BOOL showEagleMap
Definition AMapNaviDriveView.h:235
AMapNaviViewTrackingMode trackingMode
Definition AMapNaviDriveView.h:66
AMapNaviDriveViewShowMode showMode
Definition AMapNaviDriveView.h:72
BOOL showGreyAfterPass
Definition AMapNaviDriveView.h:211
NSArray< AMapNaviPolylineTrafficStatusColor * > * routeStatusColor
Definition AMapNaviDriveView.h:231
BOOL canChangeTrackingMode
Definition AMapNaviDriveView.h:61
BOOL showTrafficLayer __attribute((deprecated("Deprecated, Please use mapShowTraffic combined with -statusTextures: replace. since 7.4.0")))
BOOL mapShowTraffic
Definition AMapNaviDriveView.h:117
BOOL showCar
Definition AMapNaviDriveView.h:199
CGRect tmcRouteFrame
Definition AMapNaviDriveView.h:443
BOOL showOverSpeedPulse
Definition AMapNaviDriveView.h:243
BOOL autoSwitchShowModeToCarPositionLocked
Definition AMapNaviDriveView.h:467
BOOL showBackupRoute
Definition AMapNaviDriveView.h:207
id< AMapNaviDriveViewDelegate > delegate
Definition AMapNaviDriveView.h:35
BOOL showMoreButton
Definition AMapNaviDriveView.h:439
BOOL showBrowseRouteButton
Definition AMapNaviDriveView.h:435
MACustomCalloutView * customCalloutView
Definition AMapNaviDriveView.h:219
BOOL showCrossImage
Definition AMapNaviDriveView.h:423
BOOL showRoute
Definition AMapNaviDriveView.h:203
NSArray< AMapNaviTMCStatusColor * > * tmcRouteColor
Definition AMapNaviDriveView.h:447
CGFloat cameraDegree
Definition AMapNaviDriveView.h:129
BOOL showRefreshButton
Definition AMapNaviDriveView.h:455
AMapNaviPolylineGreyColor * routeGreyColor
Definition AMapNaviDriveView.h:227
BOOL autoSwitchDayNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")))
CGFloat mapZoomLevel
Definition AMapNaviDriveView.h:121
BOOL showUIElements
Definition AMapNaviDriveView.h:419
BOOL showDriveCongestion
Definition AMapNaviDriveView.h:247
BOOL showTrafficLightView
Definition AMapNaviDriveView.h:257
CGPoint compassOrigin
Definition AMapNaviDriveView.h:109
BOOL showTrafficLights
Definition AMapNaviDriveView.h:195
BOOL showScale
Definition AMapNaviDriveView.h:97
CGFloat lineWidth
Definition AMapNaviDriveView.h:215
BOOL isLandscape
Definition AMapNaviDriveView.h:461
BOOL onlyForGuide
Definition AMapNaviDriveView.h:260
BOOL turnArrowIs3D
Definition AMapNaviDriveView.h:183
UIColor * turnArrowColor
Definition AMapNaviDriveView.h:175
BOOL logoEnable
Definition AMapNaviDriveView.h:87
BOOL showStandardNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")))
CGSize logoSize
Definition AMapNaviDriveView.h:83
AMapNaviViewMapModeType mapViewModeType
Definition AMapNaviDriveView.h:141
BOOL showTurnArrow
Definition AMapNaviDriveView.h:171
CGPoint screenAnchor
Definition AMapNaviDriveView.h:133
CGFloat turnArrowWidth
Definition AMapNaviDriveView.h:179
id< AMapNaviDriveViewResProxyDelegate > resProxydelegate
Definition AMapNaviDriveView.h:51
BOOL showCompass
Definition AMapNaviDriveView.h:105
BOOL showTrafficBar
Definition AMapNaviDriveView.h:431
UIColor * turnArrowSideColor
Definition AMapNaviDriveView.h:187
BOOL showCameraDistance
Definition AMapNaviDriveView.h:239
BOOL showCamera
Definition AMapNaviDriveView.h:167
BOOL showDriveGuideNaviAnimation
Definition AMapNaviDriveView.h:451
Definition AMapNaviCommonObj.h:1665
Definition AMapNaviCommonObj.h:1507
Definition AMapNaviCommonObj.h:1762
Definition MACustomCalloutView.h:15
Definition MAMapCustomStyleOptions.h:12
AMapNaviDriveDataRepresentable协议.实例对象可以通过实现该协议,并将其通过 AMapNaviDriveManager 的addDataRepresentative:方法进行...
Definition AMapNaviDriveDataRepresentable.h:27
© 2017 高德信息技术有限公司 版权所有,保留所有权利。