Skip to content

🤔 [QUESTION] how to remove the click listener on the layer when removing the layer  #234

@helxsz

Description

@helxsz

🐛 Question description [Please make everyone to understand it]

I build a new layer - PointLayer and subscribe to a click event.

    layer.on('click', e => {
                console.log('click',e);
                const { lng, lat } = e.lngLat;
     });

when remove this layer with scene.remove(layer), wondering is there any method to unregister the click listener or the scene.remove(layer) can automatically do the job.

    "@antv/l7": "^2.17.8",
    "@antv/l7-core": "^2.21.8",
    "@antv/l7-draw": "^3.1.3",
    "@antv/l7-maps": "^2.17.8",
    "@antv/larkmap": "^1.4.17",

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