#import <MAMapView.h>
◆ addAnnotation:
向地图窗口添加标注,需要实现MAMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
- Parameters
-
◆ addAnnotations:
- (void) addAnnotations: |
|
(NSArray *) |
annotations |
|
向地图窗口添加一组标注,需要实现MAMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
- Parameters
-
◆ annotationsInMapRect:
- (NSSet *) annotationsInMapRect: |
|
(MAMapRect) |
mapRect |
|
获取指定投影矩形范围内的标注
- Parameters
-
- Returns
- 标注集合
◆ dequeueReusableAnnotationViewWithIdentifier:
- (MAAnnotationView *) dequeueReusableAnnotationViewWithIdentifier: |
|
(NSString *) |
identifier |
|
从复用内存池中获取制定复用标识的annotation view
- Parameters
-
- Returns
- annotation view
◆ deselectAnnotation:animated:
- (void) deselectAnnotation: |
|
(id< MAAnnotation >) |
annotation |
animated: |
|
(BOOL) |
animated |
|
|
| |
取消选中标注数据对应的view
- Parameters
-
annotation | 标注数据 |
animated | 是否有动画效果 |
◆ removeAnnotation:
◆ removeAnnotations:
- (void) removeAnnotations: |
|
(NSArray *) |
annotations |
|
◆ selectAnnotation:animated:
- (void) selectAnnotation: |
|
(id< MAAnnotation >) |
annotation |
animated: |
|
(BOOL) |
animated |
|
|
| |
选中标注数据对应的view。注意:如果annotation对应的annotationView因不在屏幕范围内而被移入复用池,为了完成选中操作,会将对应的annotationView添加到地图上,并将地图中心点移至annotation.coordinate的位置。
- Parameters
-
annotation | 标注数据 |
animated | 是否有动画效果 |
◆ showAnnotations:animated:
- (void) showAnnotations: |
|
(NSArray *) |
annotations |
animated: |
|
(BOOL) |
animated |
|
|
| |
设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置。
- Parameters
-
annotations | 需要显示的annotation |
animated | 是否执行动画 |
◆ showAnnotations:edgePadding:animated:
- (void) showAnnotations: |
|
(NSArray *) |
annotations |
edgePadding: |
|
(UIEdgeInsets) |
insets |
animated: |
|
(BOOL) |
animated |
|
|
| |
设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置。
- Parameters
-
annotations | 需要显示的annotation |
insets | insets 嵌入边界 |
animated | 是否执行动画 |
◆ viewForAnnotation:
根据标注数据获取标注view
- Parameters
-
- Returns
- 对应的标注view
◆ annotations
所有添加的标注, 注意从5.3.0开始返回数组内不再包含定位蓝点userLocation
◆ annotationVisibleRect
- (CGRect) annotationVisibleRect |
|
readnonatomicassign |
◆ selectedAnnotations
- (NSArray*) selectedAnnotations |
|
readwritenonatomiccopy |
处于选中状态的标注数据数据(其count == 0 或 1)
The documentation for this category was generated from the following file: