Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
helxsz opened this issue Jul 15, 2024 · 0 comments

Comments

@helxsz
Copy link

helxsz commented Jul 15, 2024

🐛 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",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant