Files
OrderScheduling/Pods/AMapNavi-NO-IDFA/AMapNaviKit.framework/Headers/AMapNaviRideView.h
DDIsFriend f0e8a1709d initial
2023-08-18 17:28:57 +08:00

219 lines
9.0 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// AMapNaviRideView.h
// AMapNaviKit
//
// Created by AutoNavi on 9/19/16.
// Copyright © 2016 Amap. All rights reserved.
//
#import "AMapNaviHeaderHandler.h"
#import "AMapNaviCommonObj.h"
#import "AMapNaviRideDataRepresentable.h"
#import "AMapNaviEleBikeDataRepresentable.h"
NS_ASSUME_NONNULL_BEGIN
///骑行导航界面显示模式
typedef NS_ENUM(NSInteger, AMapNaviRideViewShowMode)
{
AMapNaviRideViewShowModeCarPositionLocked = 1, ///< 锁车状态
AMapNaviRideViewShowModeOverview = 2, ///< 全览状态
AMapNaviRideViewShowModeNormal = 3, ///< 普通状态
};
@protocol AMapNaviRideViewDelegate;
///骑行导航界面.该类实现AMapNaviRideDataRepresentable协议,可通过 AMapNaviRideManager 的addDataRepresentative:方法进行注册展示骑行导航过程.
@interface AMapNaviRideView : UIView<AMapNaviRideDataRepresentable,AMapNaviEleBikeDataRepresentable>
#pragma mark - Delegate
///实现了 AMapNaviRideViewDelegate 协议的类指针
@property (nonatomic, weak) id<AMapNaviRideViewDelegate> delegate;
#pragma mark - Options
///目前是否为横屏状态. since 7.4.0 内部会自行监听 UIDeviceOrientationDidChange 进行横竖屏切换,无需再设置此值,但用户要自行保证 AMapNaviRideView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight让 AMapNaviRideView 能够跟着父View一起变化. 可通过回调 -rideView:didChangeOrientation: 获取横竖屏切换时机
@property (nonatomic, assign, readonly) BOOL isLandscape;
///导航界面跟随模式,默认AMapNaviViewTrackingModeMapNorth
@property (nonatomic, assign) AMapNaviViewTrackingMode trackingMode;
///导航界面显示模式,默认AMapNaviDriveViewShowModeCarPositionLocked
@property (nonatomic, assign) AMapNaviRideViewShowMode showMode;
///是否显示界面元素,默认YES
@property (nonatomic, assign) BOOL showUIElements;
///是否黑夜模式,默认NO. 对应的地图样式为:白天模式MAMapTypeNavi,黑夜模式MAMapTypeStandardNight.
@property (nonatomic, assign) BOOL showStandardNightType __attribute((deprecated("已废弃, 请使用 mapViewModeType 替代 since 8.0.0")));
///是否显示全览按钮,默认YES
@property (nonatomic, assign) BOOL showBrowseRouteButton;
///是否显示更多按钮,默认YES
@property (nonatomic, assign) BOOL showMoreButton;
///是否显示转向箭头,默认YES
@property (nonatomic, assign) BOOL showTurnArrow;
///是否显示传感器方向信息,默认NO.设置为YES后,自车图标方向将显示为设备方向
@property (nonatomic, assign) BOOL showSensorHeading;
///导航界面日夜模式类型, 默认为 AMapNaviViewMapModeTypeDay(白天模式) since 8.0.0
@property (nonatomic, assign) AMapNaviViewMapModeType mapViewModeType;
#pragma mark - MapView
///是否显示指南针,默认NO
@property (nonatomic, assign) BOOL showCompass;
///锁车状态下地图cameraDegree, 默认30.0, 范围[0,60]
@property (nonatomic, assign) CGFloat cameraDegree;
///当前地图是否显示比例尺默认NO
@property (nonatomic, assign) BOOL showScale;
///当前地图比例尺的原点位置,默认(10,10)
@property (nonatomic, assign) CGPoint scaleOrigin;
///地图的视图锚点. (0, 0)为左上角,(1, 1)为右下角. 可通过设置此值来改变自车图标的默认显示位置. 注意:只有showUIElements为NO时设置此值才有效 since 8.0.0
@property (nonatomic, assign) CGPoint screenAnchor;
///指南针原点位置. since 8.0.0
@property (nonatomic, assign) CGPoint compassOrigin;
///当前地图是否开启自定义样式, 默认NO. 设置为YES将忽略showStandardNightType的设置并将mapType切换为MAMapTypeStandard. 设置为NO将根据showStandardNightType恢复mapType. since 5.1.0
@property (nonatomic, assign) BOOL customMapStyleEnabled __attribute((deprecated("已废弃, 请使用 mapViewModeType 替代 since 8.0.0")));
/**
* @brief 自定义当前地图样式, 目前仅支持自定义标准类型. 已废弃, 请使用 setCustomMapStyleOptions: since 6.6.0
* @param customJson 自定义的JSON格式数据.
*/
- (void)setCustomMapStyle:(NSData *)customJson __attribute((deprecated("已废弃, 请使用 setCustomMapStyleOptions: since 6.6.0")));
/**
* @brief 根据web导出数据设置地图样式, 目前仅支持自定义标准类型. 默认不生效调用customMapStyleEnabled=YES使生效. since 6.2.0
* @param data 高德web端工具导出的地图样式数据.
*/
- (void)setCustomMapStyleWithWebData:(NSData*)data __attribute((deprecated("已废弃, 请使用 setCustomMapStyleOptions: since 6.6.0")));
/**
* @brief 自定义地图样式设置,可以支持分级样式配置,如控制不同级别显示不同的颜色(自6.6.0开始使用新版样式旧版样式无法在新版接口setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions中使用请到官网(lbs.amap.com)更新新版样式文件)
* @param styleOptions 自定义样式options. since 6.6.0
*/
- (void)setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions;
#pragma mark - Polyline Texture
///路线polyline的宽度,设置0恢复默认宽度
@property (nonatomic, assign) CGFloat lineWidth;
///标准路线Polyline的纹理图片,设置nil恢复默认纹理.纹理图片需满足长宽相等且宽度值为2的次幂
@property (nonatomic, copy, nullable) UIImage *normalTexture;
///走过的路线是否置灰,默认为NO. since 7.4.0
@property (nonatomic, assign) BOOL showGreyAfterPass;
///路线纹理部分走过后置灰的纹理图片,设置nil恢复默认纹理. 纹理图片需满足长宽相等且宽度值为2的次幂. since 7.4.0
@property (nonatomic, copy, nullable) UIImage *greyTexture;
#pragma mark - Image
/**
* @brief 设置路径起点图标
* @param startPointImage 起点图标,设置nil为默认图标
*/
- (void)setStartPointImage:(nullable UIImage *)startPointImage;
/**
* @brief 设置路径终点图标
* @param endPointImage 终点图标,设置nil为默认图标
*/
- (void)setEndPointImage:(nullable UIImage *)endPointImage;
/**
* @brief 设置自车图标
* @param carImage 自车图标,设置nil为默认图标
*/
- (void)setCarImage:(nullable UIImage *)carImage;
/**
* @brief 设置自车罗盘图标
* @param carCompassImage 自车罗盘图标,设置nil为默认图标
*/
- (void)setCarCompassImage:(nullable UIImage *)carCompassImage;
/**
* @brief 设置路径途经点图标 since 9.3.5
* @param wayPointImage 途经点图标,设置nil为默认图标
*/
- (void)setWayPointImage:(nullable UIImage *)wayPointImage;
#pragma mark - Other
/**
* @brief 在全览状态下调用此函数能够让路线显示在可视区域内(排除EdgePadding后剩余的区域),保证路线不被自定义界面元素遮挡. 比如showUIElements为NO时自定义界面横竖屏切换后可以调用此函数. since 8.0.0
*/
- (void)updateRoutePolylineInTheVisualRangeWhenTheShowModeIsOverview;
@end
@protocol AMapNaviRideViewDelegate <NSObject>
@optional
/**
* @brief 导航界面关闭按钮点击时的回调函数
* @param rideView 骑行导航界面
*/
- (void)rideViewCloseButtonClicked:(AMapNaviRideView *)rideView;
/**
* @brief 导航界面更多按钮点击时的回调函数
* @param rideView 骑行导航界面
*/
- (void)rideViewMoreButtonClicked:(AMapNaviRideView *)rideView;
/**
* @brief 导航界面转向指示View点击时的回调函数
* @param rideView 骑行导航界面
*/
- (void)rideViewTrunIndicatorViewTapped:(AMapNaviRideView *)rideView;
/**
* @brief 导航界面显示模式改变后的回调函数
* @param rideView 骑行导航界面
* @param showMode 显示模式
*/
- (void)rideView:(AMapNaviRideView *)rideView didChangeShowMode:(AMapNaviRideViewShowMode)showMode;
/**
* @brief 导航界面跟随模式改变后的回调函数. since 7.4.0
* @param rideView 骑行导航界面
* @param trackMode 跟随模式
*/
- (void)rideView:(AMapNaviRideView *)rideView didChangeTrackingMode:(AMapNaviViewTrackingMode)trackMode;
/**
* @brief 导航界面横竖屏切换后的回调函数. since 7.4.0
* @param rideView 骑行导航界面
* @param isLandscape 是否是横屏
*/
- (void)rideView:(AMapNaviRideView *)rideView didChangeOrientation:(BOOL)isLandscape;
/**
* @brief 导航界面白天黑夜模式切换后的回调函数. since 8.0.0
* @param rideView 骑行导航界面
* @param showStandardNightType 是否为黑夜模式
*/
- (void)rideView:(AMapNaviRideView *)rideView didChangeDayNightType:(BOOL)showStandardNightType;
/**
* @brief 在showUIElements为NO时骑行导航界面需要实时的取得可视区域比如切换成全览时、横竖屏切换时. 注意此回调只在showUIElements为NO时才会调用且比较频繁在获取EdgePadding时请勿进行大量的计算. since 8.0.0
* @param rideView 骑行导航界面
* @return 如(100, 50, 80, 60)表示的是rideView.bounds 上边留出100px左边留出50px底部留出80px右边留出60px后的区域为可视区域一般EdgePadding的值由用户的界面布局决定.
*/
- (UIEdgeInsets)rideViewEdgePadding:(AMapNaviRideView *)rideView;
@end
NS_ASSUME_NONNULL_END