Skip to content

odLineLayer对象已经加载到地图上后手动调用config()或者setOption()方法重新设置线的curveness不生效 #6

Description

@Noah-Gilga

版本为最新
实例代码如下:
//静态路径pathvar pathLayer = new ODLineLayer(this.layerName + '.path', data, {
animation: false,
curveness: this.trailLineOpt.curveness,
globalCompositeOperation: 'lighter',
symbol: this.pathLineStyleOpt
}).addTo(map)
//粒子流光效果
var trailLayer = new ODLineLayer(this.layerName + '.trail', data, {
animationDuration: this.trailLineOpt.animationDuration,
animation: true,
curveness: this.trailLineOpt.curveness,
// random: true,
trail: 100,
symbol: this.trailLineStyleOpt
}).addTo(map)
pathLayer .config({curveness:5})
trailLayer.setOption({curveness:5})
以上两句不能手动更新图层的curveness

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions