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

标注view 更多...

#import <LMKAnnotationView.h>

类 LMKAnnotationView 继承关系图:
LMKClusterAnnotationView LMKPinAnnotationView

构造函数

(instancetype)  - initWithAnnotation:reuseIdentifier:
  初始化并返回一个annotation view 更多...
 
(void)  - prepareForReuse
  当view从reuse队列里取出时被调用,默认不做任何事 更多...
 
(void)  - setSelected:animated:
  设定view的选中状态 更多...
 
(void)  - setDragState:animated:
  设置拖动状态,支持动画 更多...
 

属性

NSString *  reuseIdentifier
  复用标志 更多...
 
LMKCalloutView *  calloutView
  气泡 更多...
 
id< LMKAnnotation annotation
  关联的annotation 更多...
 
UIImage *  image
  annotation view显示的图像 更多...
 
CGPoint  centerOffset
  默认情况下, annotation view的中心位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方 更多...
 
CGPoint  calloutOffset
  默认情况下, 弹出的气泡位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方 更多...
 
BOOL  enabled
  默认为YES,当为NO时view忽略触摸事件 更多...
 
BOOL  selected
  默认为NO,当view被点中时被设为YES 更多...
 
BOOL  canShowCallout
  当为YES时,view被选中时会弹出气泡,默认为YES 更多...
 
UIView *  leftCalloutAccessoryView
  显示在气泡左侧的view(使用默认气泡时,view的width最大值为44,height最大值为44,大于则使用最大值) 更多...
 
UIView *  rightCalloutAccessoryView
  显示在气泡右侧的view(使用默认气泡时,view的width最大值为44,height最大值为44,大于则使用最大值) 更多...
 
BOOL  draggable
  是否支持拖动 更多...
 
LMKAnnotationViewDragState  dragState
  当前view的拖动状态 更多...
 

详细描述

标注view

函数文档

- (instancetype) initWithAnnotation: (id< LMKAnnotation >)  annotation
reuseIdentifier: (NSString *)  reuseIdentifier 

初始化并返回一个annotation view

参数
annotation 关联的annotation对象
reuseIdentifier 如果要重用view,传入一个字符串,否则设为nil,建议重用view
返回
初始化成功则返回annotation view,否则返回nil
- (void) prepareForReuse

当view从reuse队列里取出时被调用,默认不做任何事

- (void) setDragState: (LMKAnnotationViewDragState)  newDragState
animated: (BOOL)  animated 

设置拖动状态,支持动画

- (void) setSelected: (BOOL)  selected
animated: (BOOL)  animated 

设定view的选中状态

参数
selected 如果view需要显示为选中状态,该值为YES
animated 如果需要动画效果,该值为YES,暂不支持

属性说明

- (id<LMKAnnotation>) annotation
readwritenonatomicstrong

关联的annotation

- (CGPoint) calloutOffset
readwritenonatomicassign

默认情况下, 弹出的气泡位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方

- (LMKCalloutView*) calloutView
readwritenonatomicstrong

气泡

- (BOOL) canShowCallout
readwritenonatomicassign

当为YES时,view被选中时会弹出气泡,默认为YES

- (CGPoint) centerOffset
readwritenonatomicassign

默认情况下, annotation view的中心位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方

- (BOOL) draggable
readwritenonatomicassign

是否支持拖动

- (LMKAnnotationViewDragState) dragState
readwritenonatomicassign

当前view的拖动状态

- (BOOL) enabled
readwritenonatomicassign

默认为YES,当为NO时view忽略触摸事件

- (UIImage*) image
readwritenonatomicstrong

annotation view显示的图像

- (UIView*) leftCalloutAccessoryView
readwritenonatomicstrong

显示在气泡左侧的view(使用默认气泡时,view的width最大值为44,height最大值为44,大于则使用最大值)

- (NSString*) reuseIdentifier
readwritenonatomiccopy

复用标志

- (UIView*) rightCalloutAccessoryView
readwritenonatomicstrong

显示在气泡右侧的view(使用默认气泡时,view的width最大值为44,height最大值为44,大于则使用最大值)

- (BOOL) selected
readwritenonatomicassign

默认为NO,当view被点中时被设为YES


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