BaiduMap_IOSSDK_v6.5.5doc_Docs
6.5.5
|
#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置于最前面 更多... | |
- (void) addAnnotation: | (id< BMKAnnotation >) | annotation |
向地图窗口添加标注,需要实现BMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
annotation | 要添加的标注 |
扩展类 BMKMapView.
- (void) addAnnotations: | (NSArray< id< BMKAnnotation >> *) | annotations |
向地图窗口添加一组标注,需要实现BMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
annotations | 要添加的标注数组 |
扩展类 BMKMapView.
- (nullable NSArray<id <BMKAnnotation>> *) annotationsInCoordinateBounds: | (BMKCoordinateBounds) | bounds |
- (nullable BMKAnnotationView *) dequeueReusableAnnotationViewWithIdentifier: | (NSString *) | identifier |
根据指定标识查找一个可被复用的标注View,一般在delegate中使用,用此函数来代替新申请一个View
identifier | 指定标识 |
扩展类 BMKMapView.
- (void) deselectAnnotation: | (id< BMKAnnotation >) | annotation | |
animated: | (BOOL) | animated | |
- (void) removeAnnotation: | (id< BMKAnnotation >) | annotation |
- (void) removeAnnotations: | (NSArray< id< BMKAnnotation > > *) | annotations |
- (void) selectAnnotation: | (id< BMKAnnotation >) | annotation | |
animated: | (BOOL) | animated | |
- (void) showAnnotations: | (NSArray< id< BMKAnnotation >> *) | annotations | |
animated: | (BOOL) | animated | |
设置地图使显示区域显示所有annotations,如果数组中只有一个则直接设置地图中心为annotation的位置
annotations | 指定的标注 |
animated | 是否启动动画 |
扩展类 BMKMapView.
- (nullable BMKAnnotationView *) viewForAnnotation: | (id< BMKAnnotation >) | annotation |
|
readnonatomiccopy |
当前地图View的已经添加的标注数组
扩展类 BMKMapView.
|
readwritenonatomicassign |
设定是否总让选中的annotaion置于最前面
扩展类 BMKMapView.