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

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
9#import "AMapNaviHeaderHandler.h"
10#import "AMapNaviCommonObj.h"
11#import "AMapNaviDriveDataRepresentable.h"
12#import "AMapNaviCompositeAnnotation.h"
13#import "AMapNaviDriveViewConfig.h"
14
15NS_ASSUME_NONNULL_BEGIN
16
17@protocol AMapNaviDriveViewDelegate;
18@protocol AMapNaviDriveViewResProxyDelegate;
19
22@interface AMapNaviDriveView : UIView <AMapNaviDriveDataRepresentable>
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
473- (void)updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview;
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
AMapNaviCommonObj.h
AMapNaviViewTrackingMode
AMapNaviViewTrackingMode
Definition AMapNaviCommonObj.h:47
AMapNaviViewMapModeType
AMapNaviViewMapModeType
Definition AMapNaviCommonObj.h:472
AMapNaviDrivingStrategy
AMapNaviDrivingStrategy
Definition AMapNaviCommonObj.h:72
AMapNaviDriveViewShowMode
AMapNaviDriveViewShowMode
Definition AMapNaviCommonObj.h:55
AMapNaviCompositeAnnotation.h
AMapNaviDriveDataRepresentable.h
AMapNaviDriveViewConfig.h
AMapNaviDriveViewState
AMapNaviDriveViewState
Definition AMapNaviDriveViewConfig.h:16
AMapNaviHeaderHandler.h
MALogoLanguage
MALogoLanguage
Definition MAMapView.h:64
AMapNaviCompositeCustomAnnotation
导航界面自定义标注 Custom annotations in the navigation interface since 5.5.0
Definition AMapNaviCompositeAnnotation.h:31
AMapNaviCustomAnnotation
Definition AMapNaviCompositeAnnotation.h:87
AMapNaviDriveViewConfig
Definition AMapNaviDriveViewConfig.h:25
AMapNaviDriveView
Definition AMapNaviDriveView.h:22
AMapNaviDriveView::maxRenderFrame
NSUInteger maxRenderFrame
Definition AMapNaviDriveView.h:137
-[AMapNaviDriveView __attribute]
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")))
AMapNaviDriveView::logoLanguage
MALogoLanguage logoLanguage
Definition AMapNaviDriveView.h:93
AMapNaviDriveView::showVectorline
BOOL showVectorline
Definition AMapNaviDriveView.h:191
AMapNaviDriveView::showTrafficButton
BOOL showTrafficButton
Definition AMapNaviDriveView.h:427
AMapNaviDriveView::logoCenter
CGPoint logoCenter
Definition AMapNaviDriveView.h:79
AMapNaviDriveView::autoZoomMapLevel
BOOL autoZoomMapLevel
Definition AMapNaviDriveView.h:125
-[AMapNaviDriveView updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview]
void updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview()
在全览状态下调用此函数能够让路线显示在可视区域内(排除EdgePadding后剩余的区域)，保证路线不被自定义界面元素遮挡. 比如showUIElements为NO时（自定义界面）横竖屏切换后，可以调用...
AMapNaviDriveView::compassSize
CGSize compassSize
Definition AMapNaviDriveView.h:113
-[AMapNaviDriveView goBackToPlanState]
BOOL goBackToPlanState()
回到行前状态，只有用户初始状态是行前时，且当前是行中时返回YES,其它状态返回NO Return to the pre line state, only when the user's initial ...
AMapNaviDriveView::dashedLineColor
UIColor * dashedLineColor
Definition AMapNaviDriveView.h:223
AMapNaviDriveView::scaleOrigin
CGPoint scaleOrigin
Definition AMapNaviDriveView.h:101
AMapNaviDriveView::showEagleMap
BOOL showEagleMap
Definition AMapNaviDriveView.h:235
AMapNaviDriveView::trackingMode
AMapNaviViewTrackingMode trackingMode
Definition AMapNaviDriveView.h:66
AMapNaviDriveView::showMode
AMapNaviDriveViewShowMode showMode
Definition AMapNaviDriveView.h:72
AMapNaviDriveView::showGreyAfterPass
BOOL showGreyAfterPass
Definition AMapNaviDriveView.h:211
AMapNaviDriveView::routeStatusColor
NSArray< AMapNaviPolylineTrafficStatusColor * > * routeStatusColor
Definition AMapNaviDriveView.h:231
AMapNaviDriveView::canChangeTrackingMode
BOOL canChangeTrackingMode
Definition AMapNaviDriveView.h:61
-[AMapNaviDriveView __attribute]
BOOL showTrafficLayer __attribute((deprecated("Deprecated, Please use mapShowTraffic combined with -statusTextures: replace. since 7.4.0")))
AMapNaviDriveView::mapShowTraffic
BOOL mapShowTraffic
Definition AMapNaviDriveView.h:117
AMapNaviDriveView::showCar
BOOL showCar
Definition AMapNaviDriveView.h:199
AMapNaviDriveView::tmcRouteFrame
CGRect tmcRouteFrame
Definition AMapNaviDriveView.h:443
AMapNaviDriveView::showOverSpeedPulse
BOOL showOverSpeedPulse
Definition AMapNaviDriveView.h:243
AMapNaviDriveView::autoSwitchShowModeToCarPositionLocked
BOOL autoSwitchShowModeToCarPositionLocked
Definition AMapNaviDriveView.h:467
AMapNaviDriveView::showBackupRoute
BOOL showBackupRoute
Definition AMapNaviDriveView.h:207
AMapNaviDriveView::delegate
id< AMapNaviDriveViewDelegate > delegate
Definition AMapNaviDriveView.h:35
AMapNaviDriveView::showMoreButton
BOOL showMoreButton
Definition AMapNaviDriveView.h:439
AMapNaviDriveView::showBrowseRouteButton
BOOL showBrowseRouteButton
Definition AMapNaviDriveView.h:435
AMapNaviDriveView::customCalloutView
MACustomCalloutView * customCalloutView
Definition AMapNaviDriveView.h:219
AMapNaviDriveView::showCrossImage
BOOL showCrossImage
Definition AMapNaviDriveView.h:423
AMapNaviDriveView::showRoute
BOOL showRoute
Definition AMapNaviDriveView.h:203
AMapNaviDriveView::tmcRouteColor
NSArray< AMapNaviTMCStatusColor * > * tmcRouteColor
Definition AMapNaviDriveView.h:447
AMapNaviDriveView::cameraDegree
CGFloat cameraDegree
Definition AMapNaviDriveView.h:129
AMapNaviDriveView::showRefreshButton
BOOL showRefreshButton
Definition AMapNaviDriveView.h:455
AMapNaviDriveView::routeGreyColor
AMapNaviPolylineGreyColor * routeGreyColor
Definition AMapNaviDriveView.h:227
-[AMapNaviDriveView __attribute]
BOOL autoSwitchDayNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")))
AMapNaviDriveView::mapZoomLevel
CGFloat mapZoomLevel
Definition AMapNaviDriveView.h:121
AMapNaviDriveView::showUIElements
BOOL showUIElements
Definition AMapNaviDriveView.h:419
AMapNaviDriveView::showDriveCongestion
BOOL showDriveCongestion
Definition AMapNaviDriveView.h:247
AMapNaviDriveView::showTrafficLightView
BOOL showTrafficLightView
Definition AMapNaviDriveView.h:257
AMapNaviDriveView::compassOrigin
CGPoint compassOrigin
Definition AMapNaviDriveView.h:109
AMapNaviDriveView::showTrafficLights
BOOL showTrafficLights
Definition AMapNaviDriveView.h:195
AMapNaviDriveView::showScale
BOOL showScale
Definition AMapNaviDriveView.h:97
AMapNaviDriveView::lineWidth
CGFloat lineWidth
Definition AMapNaviDriveView.h:215
AMapNaviDriveView::isLandscape
BOOL isLandscape
Definition AMapNaviDriveView.h:461
AMapNaviDriveView::onlyForGuide
BOOL onlyForGuide
Definition AMapNaviDriveView.h:260
AMapNaviDriveView::turnArrowIs3D
BOOL turnArrowIs3D
Definition AMapNaviDriveView.h:183
AMapNaviDriveView::turnArrowColor
UIColor * turnArrowColor
Definition AMapNaviDriveView.h:175
AMapNaviDriveView::logoEnable
BOOL logoEnable
Definition AMapNaviDriveView.h:87
-[AMapNaviDriveView __attribute]
BOOL showStandardNightType __attribute((deprecated("Deprecated, please use mapViewModeType instead. since 6.7.0")))
AMapNaviDriveView::logoSize
CGSize logoSize
Definition AMapNaviDriveView.h:83
AMapNaviDriveView::mapViewModeType
AMapNaviViewMapModeType mapViewModeType
Definition AMapNaviDriveView.h:141
AMapNaviDriveView::showTurnArrow
BOOL showTurnArrow
Definition AMapNaviDriveView.h:171
AMapNaviDriveView::screenAnchor
CGPoint screenAnchor
Definition AMapNaviDriveView.h:133
AMapNaviDriveView::turnArrowWidth
CGFloat turnArrowWidth
Definition AMapNaviDriveView.h:179
AMapNaviDriveView::resProxydelegate
id< AMapNaviDriveViewResProxyDelegate > resProxydelegate
Definition AMapNaviDriveView.h:51
AMapNaviDriveView::showCompass
BOOL showCompass
Definition AMapNaviDriveView.h:105
AMapNaviDriveView::showTrafficBar
BOOL showTrafficBar
Definition AMapNaviDriveView.h:431
AMapNaviDriveView::turnArrowSideColor
UIColor * turnArrowSideColor
Definition AMapNaviDriveView.h:187
AMapNaviDriveView::showCameraDistance
BOOL showCameraDistance
Definition AMapNaviDriveView.h:239
AMapNaviDriveView::showCamera
BOOL showCamera
Definition AMapNaviDriveView.h:167
AMapNaviDriveView::showDriveGuideNaviAnimation
BOOL showDriveGuideNaviAnimation
Definition AMapNaviDriveView.h:451
AMapNaviInputTip
Definition AMapNaviCommonObj.h:1696
AMapNaviPolylineGreyColor
Definition AMapNaviCommonObj.h:1507
AMapNaviServiceAreaDetailInfo
Definition AMapNaviCommonObj.h:1793
MACustomCalloutView
Definition MACustomCalloutView.h:15
MAMapCustomStyleOptions
Definition MAMapCustomStyleOptions.h:12
AMapNaviDriveDataRepresentable-p
AMapNaviDriveDataRepresentable协议.实例对象可以通过实现该协议,并将其通过 AMapNaviDriveManager 的addDataRepresentative:方法进行...
Definition AMapNaviDriveDataRepresentable.h:27
© 2017 高德信息技术有限公司 版权所有，保留所有权利。