百度地图SDK for iOS v4.1.1 类参考
构造函数 | 类方法 | 属性 | 所有成员列表
BMKSCTXPassengerManager类 参考

司乘同显乘客端控制器类 更多...

#import <BMKSCTXPassengerManager.h>

类 BMKSCTXPassengerManager 继承关系图:

构造函数

(instancetype) - initWithMapView:orderInfo:displayOption:
 
(void) - onPause
 
(void) - onResume
 
(void) - updateCarAnnotationInfoWith:
 
(void) - updateStartAnnotationInfoWith:
 
(void) - updateEndAnnotationInfoWith:
 
(void) - setMapElementNeedToDrawForOrderStatus:elementToDraw:
 
(void) - setMapElementNeedToFitInMapForOrderStatus:elementToFitInMap:
 
(BOOL) - isInternalOverlay:
 
(BMKAnnotationView *) - generateViewForAnnotation:onMapView:
 
(BMKOverlayView *) - generateViewForOverlay:onMapView:
 
(void) - mapView:regionWillChangeAnimated:
 
(void) - mapView:regionDidChangeAnimated:
 
(void) - didUpdateUserLocation:
 

类方法

(void) + setLogEnable:
 

属性

BMKPointAnnotationstartAnnotation
 
BMKPointAnnotationendAnnotation
 
BMKPointAnnotationcarAnnotation
 
BMKSCTXOrderStatus status
 
BOOL isLogEnabled
 
UIEdgeInsets mapRegionPadding
 
NSUInteger driverPositionRefreshInterval
 
NSUInteger mapRegionAutoAdjustTimeInterval
 
NSUInteger mapRegionFrozenTime
 
id< BMKSCTXPassengerManagerDelegate > delegate
 

详细描述

司乘同显乘客端控制器类

函数文档

◆ didUpdateUserLocation:()

- (void) didUpdateUserLocation: (BMKUserLocation *)  userLocation

APP在BMKLocationServiceDelegate的didUpdateBMKUserLocation及didUpdateUserHeading回调中调用此方法

参数
userLocation新的用户位置

◆ generateViewForAnnotation:onMapView:()

- (BMKAnnotationView *) generateViewForAnnotation: (id< BMKAnnotation >)  annotation
onMapView: (BMKMapView *)  mapView 

APP在mapView对应的viewForAnnotation回调方法中调用此方法

参数
annotation标注
mapView地图
返回
对于BMKSCTXPassengerManager的annotation,返回相应的annotationView,否则返回nil

◆ generateViewForOverlay:onMapView:()

- (BMKOverlayView *) generateViewForOverlay: (id< BMKOverlay >)  overlay
onMapView: (BMKMapView *)  mapView 

APP在mapView对应的viewForOverlay回调方法中调用此方法

参数
overlay覆盖物
mapView地图
返回
对于BMKSCTXPassengerManager的overlay,返回相应的overlayView,否则返回nil

◆ initWithMapView:orderInfo:displayOption:()

- (instancetype) initWithMapView: (BMKMapView *)  mapView
orderInfo: (BMKSCTXOrderInfo *)  orderInfo
displayOption: (BMKSCTXPassengerDisplayOption *)  displayOption 

初始化方法 注意:APP需要在收到mapViewDidFinishLoading回调之后,再初始化本对象。

参数
mapView需要由司乘同显服务控制的mapView实例(不能为空)
orderInfo订单信息(不能为空)
displayOption显示自定义配置
返回
司乘同显控制器对象;若mapView或orderInfo为空,orderInfo信息不合法则返回nil

◆ isInternalOverlay:()

- (BOOL) isInternalOverlay: (id< BMKOverlay >)  overlay

判断是否是司乘同显服务内部的overlay

参数
overlay待判断覆盖物对象
返回
是服务内部的overlay则返回True,否则返回False

◆ mapView:regionDidChangeAnimated:()

- (void) mapView: (BMKMapView *)  mapView
regionDidChangeAnimated: (BOOL)  animated 

APP在mapView对应的回调方法中调用此方法

参数
mapView地图
animated是否动画

◆ mapView:regionWillChangeAnimated:()

- (void) mapView: (BMKMapView *)  mapView
regionWillChangeAnimated: (BOOL)  animated 

APP在mapView对应的回调方法中调用此方法

参数
mapView地图
animated是否动画

◆ onPause()

- (void) onPause

暂停司乘同显服务 当APP不需要显示司乘同显页面时(如APP退到后台),调用该方法,司乘同显SDK将停止数据刷新

◆ onResume()

- (void) onResume

恢复司乘同显服务 当APP需要显示司乘同显页面时(如APP回到前台),调用该方法,司乘同显SDK将回复数据刷新

◆ setLogEnable:()

+ (void) setLogEnable: (BOOL)  enable

设置是否开启日志输出 静态方法,需要在BMKSCTXPassengerManager实例化之前调用,否则会引起日志打印不全

参数
enableTure则打印日志,False则不打印

◆ setMapElementNeedToDrawForOrderStatus:elementToDraw:()

- (void) setMapElementNeedToDrawForOrderStatus: (BMKSCTXOrderStatus)  orderStatus
elementToDraw: (BMKSCTXElementToDrawType)  elementToDraw 

设置不同订单状态下需要绘制的元素

参数
orderStatus订单状态
elementToDraw需要绘制的元素类型

◆ setMapElementNeedToFitInMapForOrderStatus:elementToFitInMap:()

- (void) setMapElementNeedToFitInMapForOrderStatus: (BMKSCTXOrderStatus)  orderStatus
elementToFitInMap: (BMKSCTXElementToFitInMapType)  elementToFitInMap 

设置不同订单状态下需要保持在最佳视野内的元素

参数
orderStatus订单状态
elementToFitInMap需要保持在最佳视野内的元素类型

◆ updateCarAnnotationInfoWith:()

- (void) updateCarAnnotationInfoWith: (UIView *)  calloutView

设置小车弹出框气泡

参数
calloutView气泡显示内容

◆ updateEndAnnotationInfoWith:()

- (void) updateEndAnnotationInfoWith: (UIView *)  calloutView

设置订单终点Annotation的弹出框气泡

参数
calloutView气泡显示内容

◆ updateStartAnnotationInfoWith:()

- (void) updateStartAnnotationInfoWith: (UIView *)  calloutView

设置订单起点Annotation的弹出框气泡

参数
calloutView气泡显示内容

属性说明

◆ carAnnotation

- (BMKPointAnnotation*) carAnnotation
readnonatomicstrong

车辆标注

◆ delegate

- (id<BMKSCTXPassengerManagerDelegate>) delegate
readwritenonatomicweak

司乘同显服务回调对象

◆ driverPositionRefreshInterval

- (NSUInteger) driverPositionRefreshInterval
readwritenonatomicassign

车辆位置刷新时间间隔,单位(秒)。 默认5s,值域[5,30],超过边界值后将调整为边界值

◆ endAnnotation

- (BMKPointAnnotation*) endAnnotation
readnonatomicstrong

订单终点的标注

◆ isLogEnabled

- (BOOL) isLogEnabled
readnonatomicassign

是否开启了log输出。只读属性

◆ mapRegionAutoAdjustTimeInterval

- (NSUInteger) mapRegionAutoAdjustTimeInterval
readwritenonatomicassign

用户没有操作时,随着剩余距离的减少,要保证剩余线路、小车和终点及其气泡处于最佳全览视野下,需要SDK自动调整地图显示区域。 此属性用于设置自动调整的时间间隔,如果没有到达下一个时间调整节点,即使当前有需要显示的标注已经超出屏幕范围之外,也不会自动调整地图显示区域。 默认间隔为10秒。最大值为30秒,最小值为5秒; 大于最大值将设置为最大值,小于最小值将设置为最小值

◆ mapRegionFrozenTime

- (NSUInteger) mapRegionFrozenTime
readwritenonatomicassign

地图显示区域的冻结时间 用户手动操作地图之后,需要经过一段时间之后,才允许SDK自动调整地图的显示区域。 若设置字段的值为10秒,意味着每次用户操作地图之后,都有10秒钟的冻结时间。这10秒钟之内,SDK不会自动调整地图的显示区域。 默认时间为10秒。最大值为30秒,最小值为10秒 大于最大值将设置为最大值,小于最小值将设置为最小值

◆ mapRegionPadding

- (UIEdgeInsets) mapRegionPadding
readwritenonatomicassign

调整地图时需要设置的padding 默认为(30, 30, 80, 30)。意思是标注和路线需要在mapView抠去此padding后的区域内实现最佳全览视野

◆ startAnnotation

- (BMKPointAnnotation*) startAnnotation
readnonatomicstrong

订单起点的标注

◆ status

- (BMKSCTXOrderStatus) status
readwritenonatomicassign

订单状态属性


该类的文档由以下文件生成: