BaiduMap_IOSSDK_v6.5.5doc_Docs  6.5.5
构造函数 | 属性 | 所有成员列表
BMKMapView(AnnotationAPI)分类 参考

#import <BMKMapView.h>

构造函数

(void) - addAnnotation:
 
(void) - addAnnotations:
 
(void) - removeAnnotation:
 
(void) - removeAnnotations:
 
(nullable BMKAnnotationView *) - viewForAnnotation:
 
(nullable BMKAnnotationView *) - dequeueReusableAnnotationViewWithIdentifier:
 
(void) - selectAnnotation:animated:
 
(void) - deselectAnnotation:animated:
 
(void) - showAnnotations:animated:
 
(nullable NSArray< id< BMKAnnotation >> *) - annotationsInCoordinateBounds:
 

属性

NSArray< id< BMKAnnotation > > * annotations
 当前地图View的已经添加的标注数组 更多...
 
BOOL isSelectedAnnotationViewFront
 设定是否总让选中的annotaion置于最前面 更多...
 

函数文档

◆ addAnnotation:

- (void) addAnnotation: (id< BMKAnnotation >)  annotation

向地图窗口添加标注,需要实现BMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View

参数
annotation要添加的标注

扩展类 BMKMapView.

◆ addAnnotations:

- (void) addAnnotations: (NSArray< id< BMKAnnotation >> *)  annotations

向地图窗口添加一组标注,需要实现BMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View

参数
annotations要添加的标注数组

扩展类 BMKMapView.

◆ annotationsInCoordinateBounds:

- (nullable NSArray<id <BMKAnnotation>> *) annotationsInCoordinateBounds: (BMKCoordinateBounds bounds

获取矩形区域内的所有annotations

参数
bounds矩形区域(经纬度)

扩展类 BMKMapView.

◆ dequeueReusableAnnotationViewWithIdentifier:

- (nullable BMKAnnotationView *) dequeueReusableAnnotationViewWithIdentifier: (NSString *)  identifier

根据指定标识查找一个可被复用的标注View,一般在delegate中使用,用此函数来代替新申请一个View

参数
identifier指定标识
返回
返回可被复用的标注View

扩展类 BMKMapView.

◆ deselectAnnotation:animated:

- (void) deselectAnnotation: (id< BMKAnnotation >)  annotation
animated: (BOOL)  animated 

取消指定的标注的选中状态,本版暂不支持animate效果

参数
annotation指定的标注
animated本版暂不支持

扩展类 BMKMapView.

◆ removeAnnotation:

- (void) removeAnnotation: (id< BMKAnnotation >)  annotation

移除标注

参数
annotation要移除的标注

扩展类 BMKMapView.

◆ removeAnnotations:

- (void) removeAnnotations: (NSArray< id< BMKAnnotation > > *)  annotations

移除一组标注

参数
annotations要移除的标注数组

扩展类 BMKMapView.

◆ selectAnnotation:animated:

- (void) selectAnnotation: (id< BMKAnnotation >)  annotation
animated: (BOOL)  animated 

选中指定的标注,本版暂不支持animate效果

参数
annotation指定的标注
animated本版暂不支持

扩展类 BMKMapView.

◆ showAnnotations:animated:

- (void) showAnnotations: (NSArray< id< BMKAnnotation >> *)  annotations
animated: (BOOL)  animated 

设置地图使显示区域显示所有annotations,如果数组中只有一个则直接设置地图中心为annotation的位置

参数
annotations指定的标注
animated是否启动动画

扩展类 BMKMapView.

◆ viewForAnnotation:

- (nullable BMKAnnotationView *) viewForAnnotation: (id< BMKAnnotation >)  annotation

查找指定标注对应的View,如果该标注尚未显示,返回nil

参数
annotation指定的标注
返回
指定标注对应的View

扩展类 BMKMapView.

属性说明

◆ annotations

- (NSArray<id <BMKAnnotation> >*) annotations
readnonatomiccopy

当前地图View的已经添加的标注数组

扩展类 BMKMapView.

◆ isSelectedAnnotationViewFront

- (BOOL) isSelectedAnnotationViewFront
readwritenonatomicassign

设定是否总让选中的annotaion置于最前面

扩展类 BMKMapView.


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