iOS高德地图SDK(2D)  v5.6.0
MAAnnotationView Class Reference

标注view More...

#import <MAAnnotationView.h>

Inheritance diagram for MAAnnotationView:
MAPinAnnotationView

Instance Methods

(id) - initWithAnnotation:reuseIdentifier:
 初始化并返回一个annotation view More...
 
(void) - prepareForReuse
 当从reuse队列里取出时被调用 More...
 
(void) - setSelected:animated:
 设置是否处于选中状态, 外部如果要选中请使用mapView的selectAnnotation方法 More...
 
(void) - setDragState:animated:
 当前view的拖动状态 More...
 

Properties

NSString * reuseIdentifier
 复用标识 More...
 
NSInteger zIndex
 z值,大值在上,默认为0 More...
 
id< MAAnnotation > annotation
 关联的annotation More...
 
UIImage * image
 显示的image More...
 
CGPoint centerOffset
 默认情况下,annotation view的中心位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素 More...
 
CGPoint calloutOffset
 默认情况下,弹出的气泡位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素 More...
 
BOOL enabled
 默认为YES,当为NO时view忽略触摸事件 More...
 
BOOL highlighted
 annotationView是否突出显示(一般不需要手动设置) More...
 
BOOL selected
 设置是否处于选中状态, 外部如果要选中请使用mapView的selectAnnotation方法 More...
 
BOOL canShowCallout
 设置是否可以显示callout,默认为NO More...
 
UIView * leftCalloutAccessoryView
 显示在气泡左侧的view More...
 
UIView * rightCalloutAccessoryView
 显示在气泡右侧的view More...
 
BOOL draggable
 是否支持拖动,默认为NO More...
 
MAAnnotationViewDragState dragState
 当前view的拖动状态 More...
 

Detailed Description

标注view

Method Documentation

◆ initWithAnnotation:reuseIdentifier:()

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

初始化并返回一个annotation view

Parameters
annotation关联的annotation对象
reuseIdentifier如果要复用view,传入一个字符串,否则设为nil,建议重用view
Returns
初始化成功则返回annotation view,否则返回nil

◆ prepareForReuse()

- (void) prepareForReuse

当从reuse队列里取出时被调用

◆ setDragState:animated:()

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

当前view的拖动状态

Parameters
newDragState要设置的拖放状态
animated是否动画设置

◆ setSelected:animated:()

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

设置是否处于选中状态, 外部如果要选中请使用mapView的selectAnnotation方法

Parameters
selected是否选中
animated是否动画设置

Property Documentation

◆ annotation

- (id<MAAnnotation>) annotation
readwritenonatomicstrong

关联的annotation

◆ calloutOffset

- (CGPoint) calloutOffset
readwritenonatomicassign

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

◆ canShowCallout

- (BOOL) canShowCallout
readwritenonatomicassign

设置是否可以显示callout,默认为NO

◆ centerOffset

- (CGPoint) centerOffset
readwritenonatomicassign

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

◆ draggable

- (BOOL) draggable
readwritenonatomicassign

是否支持拖动,默认为NO

◆ dragState

- (MAAnnotationViewDragState) dragState
readwritenonatomicassign

当前view的拖动状态

◆ enabled

- (BOOL) enabled
readwritenonatomicassign

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

◆ highlighted

- (BOOL) highlighted
readwritenonatomicassign

annotationView是否突出显示(一般不需要手动设置)

◆ image

- (UIImage*) image
readwritenonatomicstrong

显示的image

◆ leftCalloutAccessoryView

- (UIView*) leftCalloutAccessoryView
readwritenonatomicstrong

显示在气泡左侧的view

◆ reuseIdentifier

- (NSString*) reuseIdentifier
readnonatomicassign

复用标识

◆ rightCalloutAccessoryView

- (UIView*) rightCalloutAccessoryView
readwritenonatomicstrong

显示在气泡右侧的view

◆ selected

- (BOOL) selected
readwritenonatomicassign

设置是否处于选中状态, 外部如果要选中请使用mapView的selectAnnotation方法

◆ zIndex

- (NSInteger) zIndex
readwritenonatomicassign

z值,大值在上,默认为0


The documentation for this class was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。