TencentMapSDK_iOS_3D_v4.3.4
QMapView(Annotation)分类 参考

地图view的点覆盖物相关的API 更多...

#import <QMapView.h>

构造函数

(void) - addAnnotation:
 向地图窗口添加标注,需要实现QMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View 更多...
 
(void) - addAnnotations:
 向地图窗口添加一组标注,需要实现QMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View 更多...
 
(void) - removeAnnotation:
 移除标注 更多...
 
(void) - removeAnnotations:
 移除一组标注 更多...
 
(QAnnotationView *) - viewForAnnotation:
 查找指定标注对应的View,如果该标注尚未显示,返回nil 更多...
 
(QAnnotationView *) - dequeueReusableAnnotationViewWithIdentifier:
 根据指定标识查找一个可被复用的标注View,一般在delegate中使用,用此函数来代替新申请一个View 更多...
 
(void) - bringAnnotationToFront:
 将制定的annotation放在最上层渲染. 更多...
 
(void) - selectAnnotation:animated:
 选中指定的标注 更多...
 
(void) - deselectAnnotation:animated:
 取消指定的标注的选中状态 更多...
 

属性

NSArray * annotations
 当前地图View的已经添加的标注数组
 
NSArray< id< QAnnotation > > * selectedAnnotations
 当前选中的annotations
 

详细描述

地图view的点覆盖物相关的API

函数文档

◆ addAnnotation:()

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

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

参数
annotation要添加的标注

扩展类 QMapView.

◆ addAnnotations:()

- (void) addAnnotations: (NSArray *)  annotations

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

参数
annotations要添加的标注数组

扩展类 QMapView.

◆ bringAnnotationToFront:()

- (void) bringAnnotationToFront: (id< QAnnotation >)  DEPRECATED_ATTRIBUTE

将制定的annotation放在最上层渲染.

参数
annotation指定的annotation
注解
Deprecated 请使用QAnnotationView.zIndex管理顺序(默认会将本annotationView.zIndex设置为当前顶部的zIndex+1)

扩展类 QMapView.

◆ dequeueReusableAnnotationViewWithIdentifier:()

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

根据指定标识查找一个可被复用的标注View,一般在delegate中使用,用此函数来代替新申请一个View

参数
identifier指定标识
返回
返回可被复用的标注View

扩展类 QMapView.

◆ deselectAnnotation:animated:()

- (void) deselectAnnotation: (id< QAnnotation >)  annotation
animated: (BOOL)  animated 

取消指定的标注的选中状态

参数
annotation指定的标注
animated是否支持动画

扩展类 QMapView.

◆ removeAnnotation:()

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

移除标注

参数
annotation要移除的标注

扩展类 QMapView.

◆ removeAnnotations:()

- (void) removeAnnotations: (NSArray *)  annotations

移除一组标注

参数
annotations要移除的标注数组

扩展类 QMapView.

◆ selectAnnotation:animated:()

- (void) selectAnnotation: (id< QAnnotation >)  annotation
animated: (BOOL)  animated 

选中指定的标注

参数
annotation指定的标注
animated是否支持动画

扩展类 QMapView.

◆ viewForAnnotation:()

- (QAnnotationView *) viewForAnnotation: (id< QAnnotation >)  annotation

查找指定标注对应的View,如果该标注尚未显示,返回nil

参数
annotation指定的标注
返回
指定标注对应的View

扩展类 QMapView.


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