1. Line

线图层中的线,该类型无法独立创建,只能通过线图层生成

1.1. 初始化 new Line(options)

Param Type Default Description
options Object

包含以下参数的Object对象:

options.linePrimitive CustomPolylinePrimitive

添加的线要素图元对象

options.layer LineLayer

线图层对象

options.id String

线要素唯一id

[options.width] Number 10

线宽

[options.isReverse] Boolean false

是否逆向

[options.customMaterial] CustomLineMaterial BOSGeo.CustomLineMaterial.LineColorMaterial

线自定义材质对象

[options.featureType] FeatureType BOSGeo.FeatureType.LINE_NORMAL

线要素类型,目前主要支持两种FeatureType.LINE_NORMAL和FeatureType.LINE_DYNAMIC

1.2. 属性

属性名 Type Default Description
featureType FeatureType BOSGeo.FeatureType.LINE_NORMAL

线要素类型,目前主要支持两种FeatureType.LINE_NORMAL和FeatureType.LINE_DYNAMIC

id String

线要素唯一id

width Number 10

线宽

isReverse Boolean false

是否逆向

material CustomLineMaterial BOSGeo.CustomLineMaterial.LineColorMaterial

线在最初始状态基础上的整体高度偏移

heightOffset Array.<Array.<Number>> 0

线的整体高度偏移

positionsWGS84 Array.<Number>

经纬度坐标

Example

//只修改线的颜色,不改变其他属性
let lineMaterial = line.material.clone();
lineMaterial.color=BOSGeo.Color.GREEN;
line.material=lineMaterial;

1.3. 方法

1.3.1. line.destroy()

销毁对象

版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2022 all right reserved,powered by Gitbook该文件修订时间: 2022-07-19 11:34:25

results matching ""

    No results matching ""