new DynamicLines(viewer, opt)
动态线特效
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewer |
Glodon.CIMCube | CIMCube 实例 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
opt |
Object | 动态线特效参数(通用、路径贝塞尔、线型专有字段均在 opt 顶层)
Properties
|
Methods
-
createPathByPolylines(polylines)
-
按折线创建路径。
Parameters:
Name Type Description polylinesArray 折线。 Returns:
- Type
- Object
-
deletePath()
-
删除路径。
-
dispose()
-
释放资源
-
drawPath()
-
绘制路径。
-
getPolyGraphics(index)
-
获取线图形。
Parameters:
Name Type Description indexNumber 索引。 Returns:
- Type
- Object
-
hide()
-
隐藏
-
setPathData(pathList)
-
设置动态线数据
Parameters:
Name Type Description pathListarray 动态线数据数组 -
show()
-
显示
-
updateMyOption(opt)
-
更新参数(字段与构造函数 opt 相同,均为 opt 顶层属性)。
Parameters:
Name Type Description optObject 参数;通用项见 DynamicLines构造;路径贝塞尔见BezierCurveOptions;线型专有见 lineType 与对应 Options typedefProperties
Name Type Argument Description onlyPolyGraphicsBoolean <optional>
是否仅维护线图形(GeoJSON 等内部使用) layerObject <optional>
关联图层(GeoJSON 启动时使用) -
updateOption(opt)
-
更新参数
Parameters:
Name Type Description optObject 动态线特效参数 Properties
Name Type Argument Default Description lineColorColor 线的颜色 durationNumber <optional>
动态线的场合,动画时长 虚线专有属性: gapColorColor gap颜色,默认透明 dashLengthnumber <optional>
虚线长度 动态线专有属性: imageString 动态线的场合,地址url(optionIcon) blendRatioNumber <optional>
0 数值代表颜色的融合程度,范围为0-1,代表图片颜色不参与融合 虚线动态线专有属性: gapColorColor gap颜色,默认透明 dashLengthnumber <optional>
虚线长度 dashPatternnumber <optional>
0.5 长度;dash与gap的比率 dashWidthPatternnumber <optional>
1.0 宽度;dash与gap的比率 动态箭头线专有属性: imageString 动态线的场合,地址url gapColorColor gap颜色,默认透明 dashLengthnumber <optional>
箭头线长度 dashPatternnumber <optional>
0.5 长度;dash与gap的比率 dashWidthPatternnumber <optional>
1.0 宽度;dash与gap的比率 blendRatioNumber <optional>
0 数值代表颜色的融合程度,范围为0-1,代表图片颜色不参与融合