Tencent_Panorama_SDK_v1.1.3
QPanoramaView类 参考

承载街景的view,提供添加标注,切换场景,视角变换,动画等功能 更多...

#import <QPanoramaView.h>

类 QPanoramaView 继承关系图:

构造函数

(void) - setAllGesturesEnabled:
 同时设置拖动缩放手势 更多...
 
(void) - animateToCamera:animationDuration:
 指定视角变换 俯仰角Pitch区间 -90 到 10, 偏航角heading -180 到 180 更多...
 
(void) - updateCamera:animationDuration:
 指定视角变换增量 更多...
 
(void) - moveToNearCoordinate:
 移动到指定的位置 更多...
 
(void) - moveNearCoordinate:radius:
 移动到指定的位置 更多...
 
(void) - moveToPanoramaID:
 移动到指定panoramaID的位置 更多...
 
(void) - addAnnotation:
 添加标注 更多...
 
(void) - addAnnotations:
 添加一组标注 更多...
 
(void) - removeAnnotation:
 删除标注 更多...
 
(void) - removeAnnotations:
 删除一组标注 更多...
 
(QPanoAnnotationView *) - viewForAnnotation:
 获取标注视图 更多...
 
(QPanoAnnotationView *) - dequeueReusableAnnotationViewWithIdentifier:
 根据复用id获取annotation view 更多...
 
(CGPoint) - pointFromCoordinate:height:
 根据经纬度和高度获取所在屏幕坐标 更多...
 

类方法

(instancetype) + panoramaViewWithFrame:nearCoordinate:
 根据经纬度吸附街景点 更多...
 
(instancetype) + panoramaViewWithFrame:nearCoordinate:radius:
 根据经纬度和吸附半径确定街景点 更多...
 

属性

QPanoramapanorama
 
id< QPanoramaViewDelegatedelegate
 
BOOL orientationEnabled
 是否允许手势拖动来改变街景视角
 
BOOL zoomEnabled
 是否支持手势缩放场景(双指放大/缩小, 单指双击放大)
 
BOOL navigationEnable
 场景导航链接是否可点击
 
BOOL indoorLinksHidden
 是否隐藏场景内景链接
 
BOOL navigationLinksHidden
 是否隐藏场景导航链接
 
BOOL streetNamesHidden
 是否隐藏道路名
 
BOOL parkViewHidden
 是否隐藏内景场景选择栏(保留退出按钮)
 
BOOL allParkViewHidden
 是否隐藏内景场景选择栏(不保留退出按钮)
 
BOOL motionEnable
 是否使用方向传感器自动移动视角
 
QPanoramaCameracamera
 QCamera对象,控制场景视角
 
NSArray * annotations
 街景当前标注数组
 

详细描述

承载街景的view,提供添加标注,切换场景,视角变换,动画等功能

函数文档

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

添加标注

参数
annotation标注
- (void) addAnnotations: (NSArray *)  annotations

添加一组标注

参数
annotations标注数组
- (void) animateToCamera: (QPanoramaCamera *)  camera
animationDuration: (NSTimeInterval)  duration 

指定视角变换 俯仰角Pitch区间 -90 到 10, 偏航角heading -180 到 180

参数
camera视角
duration动画时间
- (QPanoAnnotationView *) dequeueReusableAnnotationViewWithIdentifier: (NSString *)  identifier

根据复用id获取annotation view

参数
identifier复用标识
返回
标注视图
- (void) moveNearCoordinate: (CLLocationCoordinate2D)  coordinate
radius: (NSUInteger)  radius 

移动到指定的位置

参数
coordinate描述位置的经纬度
radius吸附半径
- (void) moveToNearCoordinate: (CLLocationCoordinate2D)  coordiante

移动到指定的位置

参数
coordiante描述位置的经纬度
- (void) moveToPanoramaID: (NSString *)  panoramaID

移动到指定panoramaID的位置

参数
panoramaID街景ID
+ (instancetype) panoramaViewWithFrame: (CGRect)  frame
nearCoordinate: (CLLocationCoordinate2D)  coordinate 

根据经纬度吸附街景点

参数
frame尺寸
coordinate经纬度
返回
实例
+ (instancetype) panoramaViewWithFrame: (CGRect)  frame
nearCoordinate: (CLLocationCoordinate2D)  coordinate
radius: (NSUInteger)  radius 

根据经纬度和吸附半径确定街景点

参数
frame尺寸
coordinate经纬度
radius吸附半径
返回
实例
- (CGPoint) pointFromCoordinate: (CLLocationCoordinate2D)  coordinate
height: (CGFloat)  height 

根据经纬度和高度获取所在屏幕坐标

参数
coordinate经纬度
height高度
返回
屏幕坐标. 如果参数无效,则返回{-10000,-10000}

由 category QPanoramaView(Coordinate) 提供.

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

删除标注

参数
annotation待删除的标注
- (void) removeAnnotations: (NSArray *)  annotations

删除一组标注

参数
annotations待删除的标注数组
- (void) setAllGesturesEnabled: (BOOL)  enabled

同时设置拖动缩放手势

参数
enabled是否允许手势操作
- (void) updateCamera: (QPanoramaCameraUpdate *)  cameraUpdate
animationDuration: (NSTimeInterval)  duration 

指定视角变换增量

参数
cameraUpdate视角增量
duration动画时间
- (QPanoAnnotationView *) viewForAnnotation: (id< QPanoAnnotation >)  annotation

获取标注视图

参数
annotation视图对应标注
返回
标注视图

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