|
BaiduMap_IOSSDK_v6.6.5_Docs 6.6.5
|
#include <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: |
| (void) | - showAnnotations:padding:animated: |
| (nullable NSArray< id< BMKAnnotation > > *) | - annotationsInCoordinateBounds: |
属性 | |
| NSArray< id< BMKAnnotation > > * | annotations |
| 当前地图View的已经添加的标注数组 | |
| BOOL | isSelectedAnnotationViewFront |
| 设定是否总让选中的annotaion置于最前面 | |
| - (void) addAnnotation: | (id< BMKAnnotation >) | annotation |
向地图窗口添加标注,需要实现BMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
| annotation | 要添加的标注 |
| - (void) addAnnotations: | (NSArray< id< BMKAnnotation > > *) | annotations |
向地图窗口添加一组标注,需要实现BMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
| annotations | 要添加的标注数组 |
| - (nullable NSArray< id< BMKAnnotation > > *) annotationsInCoordinateBounds: | (BMKCoordinateBounds) | bounds |
获取矩形区域内的所有annotations
| bounds | 矩形区域(经纬度) |
| - (nullable BMKAnnotationView *) dequeueReusableAnnotationViewWithIdentifier: | (NSString *) | identifier |
根据指定标识查找一个可被复用的标注View,一般在delegate中使用,用此函数来代替新申请一个View
| identifier | 指定标识 |
| - (void) deselectAnnotation: | (id< BMKAnnotation >) | annotation | |
| animated: | (BOOL) | animated |
取消指定的标注的选中状态,本版暂不支持animate效果
| annotation | 指定的标注 |
| animated | 本版暂不支持 |
| - (void) removeAnnotation: | (id< BMKAnnotation >) | annotation |
移除标注
| annotation | 要移除的标注 |
| - (void) removeAnnotations: | (NSArray< id< BMKAnnotation > > *) | annotations |
移除一组标注
| annotations | 要移除的标注数组 |
| - (void) selectAnnotation: | (id< BMKAnnotation >) | annotation | |
| animated: | (BOOL) | animated |
选中指定的标注,本版暂不支持animate效果
| annotation | 指定的标注 |
| animated | 本版暂不支持 |
| - (void) showAnnotations: | (NSArray< id< BMKAnnotation > > *) | annotations | |
| animated: | (BOOL) | animated |
设置地图使显示区域显示所有annotations,如果数组中只有一个则直接设置地图中心为annotation的位置 调用此函数前要确保annotations已添加至地图,否则无效。
| annotations | 指定的标注 |
| animated | 是否启动动画 |
| - (void) showAnnotations: | (NSArray< id< BMKAnnotation > > *) | annotations | |
| padding: | (UIEdgeInsets) | padding | |
| animated: | (BOOL) | animated |
设置地图使显示区域显示所有annotations,如果数组中只有一个则直接设置地图中心为annotation的位置,since 6.5.7 调用此函数前要确保annotations已添加至地图,否则无效。
| annotations | 指定的标注 |
| padding | 适配边界 |
| animated | 是否启动动画 |
| - (nullable BMKAnnotationView *) viewForAnnotation: | (id< BMKAnnotation >) | annotation |
查找指定标注对应的View,如果该标注尚未显示,返回nil
| annotation | 指定的标注 |
|
readnonatomiccopy |
当前地图View的已经添加的标注数组
|
readwritenonatomicassign |
设定是否总让选中的annotaion置于最前面