TencentMapSDK_iOS_3D_v6.4.0
载入中...
搜索中...
未找到
QTexturePolylineView类 参考

具有丰富显示样式的线覆盖物 更多...

#include <QTexturePolylineView.h>

类 QTexturePolylineView 继承关系图:
QPolylineView QOverlayPathView QOverlayView

实例方法

(void) - eraseFromStartToCurrentPoint:searchFrom:toColor:
 路线擦除功能,将从起点开始到coordinate坐标的路线颜色置灰或擦除
 
(void) - setTurnArrowAtSegmentIndex:
 设置转向箭头的位置
 
(void) - clearTurnArrow
 隐藏转向箭头
 
(void) - setTurnArrowColor:borderColor:
 设置转向箭头的样式, 所有线共享一个样式
 
- 实例方法 继承自 QPolylineView
(instancetype) - initWithPolyline:
 根据指定的QPolyline生成一个多段线view
 
- 实例方法 继承自 QOverlayView
(void) - setMinZoomLevel:maxZoomLevel:
 设置在地图上的最大、最小的可缩放级别
 
(void) - updateOverlayPoints:pointCount:
 更新覆盖物的坐标点串
 

属性

QTextureLineDrawType drawType
 线绘制方式.
 
BOOL useGradient
 是否使用渐变效果, 仅在drawType为QTextureLineDrawType_ColorLine时有效 渐变时, 以QSegmentColor的startIndex作为渐变点颜色标记位
 
NSArray< QSegmentColor * > * segmentColor
 定义了各子线段的颜色. 当 QTextureLineDrawType_ColorLine 有效.
 
UIImage * styleTextureImage
 绘制线所采用的纹理. 当非QTextureLineDrawType_ColorLine有效.
 
NSArray< QSegmentStyle * > * segmentStyle
 定义了各子线段的样式. 当 非QTextureLineDrawType_ColorLine 有效.
 
BOOL drawSymbol
 是否绘制箭头图标
 
UIImage * symbolImage
 箭头图标。默认采用默认样式箭头
 
CGFloat symbolGap
 箭头之间的间距. 单位:Point
 
UIColor * eraseColor
 擦掉时时采用的颜色. 默认为灰色(置灰)
 
CGFloat footprintStep
 footprints之间的间距。 单位:Point
 
QAnimationemergeAnimation
 线被添加时的动画. 默认为无(目前只有多段的蚯蚓线支持动画)
 
- 属性 继承自 QPolylineView
QPolylinepolyline
 关联的QPolyline对象
 
CGFloat borderWidth
 ␈␈␈描边的宽度。 单位:Point. 宽度为0时无描边(描边宽度请小于lineWidth的一半)
 
UIColor * borderColor
 ␈␈␈描边的颜色。 宽度为0时无描边␈
 
NSArray< NSNumber * > * lineDashPattern
 ␈␈␈实线和虚线的线长序列(元素个数必须是偶数)。默认为nil为实线
 
QTexttext
 ␈ 线的名字属性. 可为线的各子部分显示不同的名字,层级与POI label相同 @notes 需保证最上层显示的文本信息中QTextStyle priority为QTextPriority_High 以及对应的overlayview的displayLevel为QOverlayLevelAboveRoads 或者 QOverlayLevelAboveBuildings。
 
BOOL disableCollideLabel
 当与底图上的POI/道路名 相交时,是否将其碰撞掉。默认为NO(碰撞掉)
 
- 属性 继承自 QOverlayPathView
UIColor * fillColor
 填充颜色
 
UIColor * strokeColor
 画笔颜色
 
CGFloat lineWidth
 画笔宽度. 单位:CGPoint长度.
 
CGFloat alpha
 透明度[0,1],默认为1.
 
- 属性 继承自 QOverlayView
id< QOverlayoverlay
 本view对应的数据类
 
QOverlayLevel displayLevel
 覆盖物的显示级别,决定了与POI等其它地理元素的压盖关系
 
int zIndex
 覆盖物的显示顺序,决定了它与其它QOverlayView的压盖关系. 默认为0.
 
int minZoomLevel
 最小缩放级别, 默认值:3
 
int maxZoomLevel
 最大缩放级别,默认值:22
 

详细描述

具有丰富显示样式的线覆盖物

默认在楼块之下(QOverlayLevelAboveRoads). 支持多种样式的分段显示

成员函数文档

◆ eraseFromStartToCurrentPoint:searchFrom:toColor:

- (void) eraseFromStartToCurrentPoint: (CLLocationCoordinate2D) coordinate
searchFrom: (int) pointIndex
toColor: (BOOL) clearColor 

路线擦除功能,将从起点开始到coordinate坐标的路线颜色置灰或擦除

参数
coordinate被擦除的终点坐标
pointIndex终点所在子线段起点的下标, 不支持下标n-1
clearColoryes则擦除; no则将线段置为擦除色(默认置灰), 注: 在QTextureLineDrawType_ColorLine时, eraseColor生效
参见
eraseColor

◆ setTurnArrowAtSegmentIndex:

- (void) setTurnArrowAtSegmentIndex: (int) index

设置转向箭头的位置

注解
箭头的显示级别为QOverlayLevelAboveBuilds

由 category QTexturePolylineView(Navigation) 提供.

属性说明

◆ drawSymbol

- (BOOL) drawSymbol
readwritenonatomicassign

是否绘制箭头图标

当QTextureLineDrawType_SliceAsBackground和QTextureLineDrawType_ColorLine时有效

◆ drawType

- (QTextureLineDrawType) drawType
readwritenonatomicassign

线绘制方式.

默认为QTextureLineDrawType_SliceAsBackground. 添加完成后不支持修改

◆ eraseColor

- (UIColor*) eraseColor
readwritenonatomicstrong

擦掉时时采用的颜色. 默认为灰色(置灰)

当QTextureLineDrawType_ColorLine时有效

◆ footprintStep

- (CGFloat) footprintStep
readwritenonatomicassign

footprints之间的间距。 单位:Point

仅当TextureLineDrawType_FootPrint时有效

◆ segmentColor

- (NSArray<QSegmentColor *>*) segmentColor
readwritenonatomiccopy

定义了各子线段的颜色. 当 QTextureLineDrawType_ColorLine 有效.

支持实时修改 目前仅支持15种不同的颜色对

◆ segmentStyle

- (NSArray<QSegmentStyle *>*) segmentStyle
readwritenonatomiccopy

定义了各子线段的样式. 当 非QTextureLineDrawType_ColorLine 有效.

支持实时修改

◆ styleTextureImage

- (UIImage*) styleTextureImage
readwritenonatomicstrong

绘制线所采用的纹理. 当非QTextureLineDrawType_ColorLine有效.

可为nil. 为nil时则采用默认样式的纹理 当QTextureLineDrawType_SliceAsBackground时, 要求图片为以1像素为单位的多行的图片.样例参照color_texture.png图片

◆ symbolGap

- (CGFloat) symbolGap
readwritenonatomicassign

箭头之间的间距. 单位:Point

当QTextureLineDrawType_SliceAsBackground和QTextureLineDrawType_ColorLine时有效

◆ symbolImage

- (UIImage*) symbolImage
readwritenonatomicstrong

箭头图标。默认采用默认样式箭头

当QTextureLineDrawType_SliceAsBackground和QTextureLineDrawType_ColorLine时有效


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