antvis/LarkMap

๐Ÿค” [QUESTION] how to remove the click listener on the layer when removing the layer

helxsz opened this issue ยท 0 comments

๐Ÿ› 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",