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