BaiduMap_IOSSDK_v6.6.6_Docs 6.6.6

载入中...
搜索中...
未找到
BMKBackgroundNavigationView.h
浏览该文件的文档.
1//
2// BMKBackgroundNavigationCALayer.h
3// MapComponent
4//
5// Created by zhaoxiangru on 2024/2/29.
6// Copyright © 2024 Baidu. All rights reserved.
7//
8
9#import <QuartzCore/QuartzCore.h>
10#import <CoreLocation/CLLocation.h>
11#import "BMKMapStatus.h"
12
13@class BMKMapView;
14
15NS_ASSUME_NONNULL_BEGIN
16//已走过路线展示方式
17 typedef NS_ENUM (NSInteger, BMKRoutePassedDisplayMode) {
18 BMKRoutePassedDisplayModeNone, // 无效果
19 BMKRoutePassedDisplayModeErased, //擦除
20 BMKRoutePassedDisplayModeGrayed //置灰
21};
22
23//已走过途径点展示方式
24 typedef NS_ENUM (NSInteger, BMKViaPointPassedDisplayMode) {
25 BMKViaPointPassedDisplayModeNone, // 无效果
26 BMKViaPointPassedDisplayModeErased, //擦除
27 BMKViaPointPassedDisplayModeGrayed //置灰
28};
29
31@interface BMKNaviLocationInfo : NSObject
33@property (nonatomic, assign) CLLocationCoordinate2D location;
35@property (nonatomic, assign) CLLocationCoordinate2D locationBindRoute;
37@property (nonatomic, assign) CGFloat direction;
39@property (nonatomic, assign) CGFloat directionRoute;
41@property (nonatomic, assign) NSInteger shapeIndex;
43@property (nonatomic, assign) BOOL isFaraway;
44@end
45
47@interface BMKNaviRouteInfo : NSObject
49@property (nonatomic, strong, nullable) NSArray<NSValue *> *routeInfo;
51@property (nonatomic, strong, nullable) NSArray<NSNumber *> *trafficInfo;
52@end
53
55@interface BMKNaviViaPointInfo : NSObject
57@property (nonatomic, assign) CLLocationCoordinate2D location;
59@property (nonatomic, assign) BOOL isPassed;
60@end
61
62@protocol BMKBackgroundNavigationViewDataSource <NSObject>
63// 用于获取导航中用户位置实时信息
64- (BMKNaviLocationInfo *)realTimeInfo;
65
66@end
67@interface BMKBackgroundNavigationView : UIView
69@property (nonatomic, weak) id<BMKBackgroundNavigationViewDataSource> dataSource;
71@property (nonatomic, weak) BMKMapView *mapview;
72
74@property (nonatomic, assign) BOOL needDrawGuideLine;
76@property (nonatomic, strong) UIColor *guideLineColor;
78@property (nonatomic, assign) CGFloat guideLineWidth;
79
81@property (nonatomic, assign) BOOL needDrawStartPoint;
83@property (nonatomic, assign) CLLocationCoordinate2D startPoint;
85@property (nonatomic, strong, nullable) UIImage *startPointIcon;
87@property (nonatomic, assign) CGSize startPointIconSize;
89@property (nonatomic, assign) CGPoint startPointIconOffset;
90
92@property (nonatomic, assign) BOOL needDrawViaPoint;
94@property (nonatomic, assign) BMKViaPointPassedDisplayMode viaPointPassedDisplayMode;
96@property (nonatomic, copy, nullable) NSArray<BMKNaviViaPointInfo *> *viaPoints;
98@property (nonatomic, strong, nullable) UIImage *viaPointIcon;
100@property (nonatomic, strong, nullable) UIImage *viaPassedPointIcon;
102@property (nonatomic, assign) CGSize viaPointIconSize;
104@property (nonatomic, assign) CGPoint viaPointIconOffset;
105
107@property (nonatomic, assign) BOOL needDrawEndPoint;
109@property (nonatomic, assign) CLLocationCoordinate2D endPoint;
111@property (nonatomic, strong, nullable) UIImage *endPointIcon;
113@property (nonatomic, assign) CGSize endPointIconSize;
115@property (nonatomic, assign) CGPoint endPointIconOffset;
116
118@property (nonatomic, strong, nullable) UIImage *navigationIcon;
120@property (nonatomic, assign) CGSize navigationIconSize;
122@property (nonatomic, assign) BOOL needFllowPhoneHeading;
123
125@property (nonatomic, assign) BOOL needDrawCompass;
127@property (nonatomic, strong, nullable) UIImage *compassIcon;
129@property (nonatomic, assign) CGSize compassIconSize;
130
132@property (nonatomic, strong) UIColor *routeColor;
134@property (nonatomic, assign) CGFloat lineWidth;
136@property (nonatomic, assign) BMKRoutePassedDisplayMode routePassedDisplayMode;
138@property (nonatomic, strong) UIColor *routePassedColor;
140@property (nonatomic, strong) NSArray<UIColor *> *trafficColor;
141
143- (void)updateRouteInfo:(BMKNaviRouteInfo *)routeInfo;
145- (void)updateNaviLocationInfo:(BMKNaviLocationInfo *)locationInfo;
146
148- (void)renderWithMapStatus:(BMKMapStatus *)mapstatus enable3D:(BOOL)enable3D fitScale:(CGFloat)fitScale mapScreenExtOffset:(CGPoint)mapScreenExtOffset;
149@end
150
151NS_ASSUME_NONNULL_END
BMKMapStatus.h
BMKMapStatus
此类表示地图状态信息
Definition BMKMapStatus.h:16
BMKMapView
地图View类，使用此View可以显示地图窗口，并且对地图进行相关的操作
Definition BMKMapView.h:118
BMKNaviLocationInfo
导航（小车）当前位置信息
Definition BMKBackgroundNavigationView.h:32
BMKNaviLocationInfo::directionRoute
CGFloat directionRoute
当前位置路线方向
Definition BMKBackgroundNavigationView.h:39
BMKNaviLocationInfo::shapeIndex
NSInteger shapeIndex
当前位置的路线形状点索引，对应BMKNaviRouteInfo的routeInfo数组
Definition BMKBackgroundNavigationView.h:41
BMKNaviLocationInfo::locationBindRoute
CLLocationCoordinate2D locationBindRoute
当前绑路后位置经纬度
Definition BMKBackgroundNavigationView.h:35
BMKNaviLocationInfo::location
CLLocationCoordinate2D location
当前位置经纬度
Definition BMKBackgroundNavigationView.h:33
BMKNaviLocationInfo::isFaraway
BOOL isFaraway
当前是否偏航（远离路线）
Definition BMKBackgroundNavigationView.h:43
BMKNaviLocationInfo::direction
CGFloat direction
当前位置方向
Definition BMKBackgroundNavigationView.h:37
BMKNaviRouteInfo
路线信息
Definition BMKBackgroundNavigationView.h:48
BMKNaviViaPointInfo
途径点信息
Definition BMKBackgroundNavigationView.h:56