立得地图iOS SDK 地图&搜索服务参考手册 V1.7.0
构造函数 | 属性 | 所有成员列表
LMKMapView(Annotation)分类 参考

地图View关于标注的类别 更多...

#import <LMKMapView.h>

构造函数

(void)  - showAnnotations:animated:
 
(void)  - addAnnotation:
  向地图窗口添加标注,需要实现LMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View 更多...
 
(void)  - addAnnotations:
  向地图窗口添加一组标注,需要实现LMKMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View 更多...
 
(void)  - removeAnnotation:
  移除标注 更多...
 
(void)  - removeAnnotations:
  移除一组标注 更多...
 
(void)  - didSelectAnnotationView:
  当选中一个annotation view时,调用此接口 更多...
 
(void)  - didDeselectAnnotationView:
  当取消选中一个annotation view时,调用此接口 更多...
 
(void)  - annotationView:didChangeDragState:fromOldState:
  拖动annotation view时view的状态变化 更多...
 
(void)  - annotationView:calloutAccessoryControlTapped:
  标注view的accessory view(必须继承自UIControl)被点击时,触发该回调 更多...
 
(void)  - didAnnotationViewCalloutTapped:
  标注view的calloutview整体点击时,触发改回调。 更多...
 
(LMKAnnotationView *)  - dequeueReusableAnnotationViewWithIdentifier:
  从复用内存池中获取制定复用标识的annotation view 更多...
 

属性

NSArray *  annotations
  标注数组 更多...
 

详细描述

地图View关于标注的类别

函数文档

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

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

参数
annotation 要添加的标注

扩展类 LMKMapView.

- (void) addAnnotations: (NSArray *)  annotations

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

参数
annotations 要添加的标注数组

扩展类 LMKMapView.

- (void) annotationView: (LMKAnnotationView *)  annotationView
calloutAccessoryControlTapped: (UIControl *)  control 

标注view的accessory view(必须继承自UIControl)被点击时,触发该回调

参数
annotationView callout所属的标注view
control 对应的control

扩展类 LMKMapView.

- (void) annotationView: (LMKAnnotationView *)  view
didChangeDragState: (LMKAnnotationViewDragState)  newState
fromOldState: (LMKAnnotationViewDragState)  oldState 

拖动annotation view时view的状态变化

参数
view annotation view
newState 新状态
oldState 旧状态

扩展类 LMKMapView.

- (LMKAnnotationView*) dequeueReusableAnnotationViewWithIdentifier: (NSString *)  identifier

从复用内存池中获取制定复用标识的annotation view

参数
identifier 复用标识
返回
annotation view

扩展类 LMKMapView.

- (void) didAnnotationViewCalloutTapped: (LMKAnnotationView *)  annotationView

标注view的calloutview整体点击时,触发改回调。

参数
annotationView calloutView所属的annotationView

扩展类 LMKMapView.

- (void) didDeselectAnnotationView: (LMKAnnotationView *)  view

当取消选中一个annotation view时,调用此接口

参数
view 取消选中的annotation view

扩展类 LMKMapView.

- (void) didSelectAnnotationView: (LMKAnnotationView *)  view

当选中一个annotation view时,调用此接口

参数
view 选中的annotation view

扩展类 LMKMapView.

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

移除标注

参数
annotation 要移除的标注

扩展类 LMKMapView.

- (void) removeAnnotations: (NSArray *)  annotations

移除一组标注

参数
annotations 要移除的标注数组

扩展类 LMKMapView.

- (void) showAnnotations: (NSArray *)  annotations
animated: (BOOL)  animated 

设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置。

参数
annotations 需要显示的annotation
animated 是否执行动画

扩展类 LMKMapView.

属性说明

- (NSArray*) annotations
readnonatomicassign

标注数组

扩展类 LMKMapView.


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