TencentMapSDK_iOS_3D_v4.3.4
QTexturePolylineView类 参考

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

#import <QTexturePolylineView.h>

类 QTexturePolylineView 继承关系图:
QPolylineView QOverlayPathView QOverlayView

构造函数

(void) - eraseFromStartToCurrentPoint:searchFrom:toColor:
 路线擦除功能,将从起点开始到coordinate坐标的路线颜色置灰或擦除 更多...
 
(void) - setTurnArrowAtSegmentIndex:
 设置转向箭头的位置 更多...
 
(void) - clearTurnArrow
 隐藏转向箭头
 
(void) - setTurnArrowColor:borderColor:
 设置转向箭头的样式, 所有线共享一个样式
 
- 构造函数 继承自 QPolylineView
(instancetype) - initWithPolyline:
 根据指定的QPolyline生成一个多段线view 更多...
 

属性

QTextureLineDrawType drawType
 线绘制方式. 更多...
 
NSArray< QSegmentColor * > * segmentColor
 定义了各子线段的颜色. 当 QTextureLineDrawType_ColorLine 有效. 更多...
 
UIImage * styleTextureImage
 
NSArray< QSegmentStyle * > * segmentStyle
 定义了各子线段的样式. 当 非QTextureLineDrawType_ColorLine 有效. 更多...
 
BOOL drawSymbol
 是否绘制箭头图标 更多...
 
UIImage * symbolImage
 
CGFloat symbolGap
 
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。
 
- 属性 继承自 QOverlayPathView
UIColor * fillColor
 填充颜色
 
UIColor * strokeColor
 画笔颜色
 
CGFloat lineWidth
 画笔宽度. 单位:Point
 
- 属性 继承自 QOverlayView
id< QOverlayoverlay
 本view对应的数据类
 
QOverlayLevel displayLevel
 覆盖物的显示级别,决定了与POI等其它地理元素的压盖关系 更多...
 
int zIndex
 覆盖物的显示顺序,决定了它与其它QOverlayView的压盖关系. 默认为0. 更多...
 

详细描述

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

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

函数文档

◆ eraseFromStartToCurrentPoint:searchFrom:toColor:()

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

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

参数
coordinate被擦除的终点坐标
pointIndex终点所在子线段起点的下标
clearColoryes则擦除 no则置灰(参照eraseColor)

当QTextureLineDrawType_SliceAsBackground和QTextureLineDrawType_ColorLine时有效

◆ 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

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

当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

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

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

◆ symbolGap

- (CGFloat) symbolGap
readwritenonatomicassign

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

当QTextureLineDrawType_SliceAsBackground和QTextureLineDrawType_ColorLine时有效

◆ symbolImage

- (UIImage*) symbolImage
readwritenonatomicstrong

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

当QTextureLineDrawType_SliceAsBackground和QTextureLineDrawType_ColorLine时有效


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