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

使用Map时会导致点击控件同时也点击了底下的layer,同时触发控件和layer的click事件 #2516

Closed
tsuyoii opened this issue Jun 3, 2024 · 7 comments
Assignees

Comments

@tsuyoii
Copy link

tsuyoii commented Jun 3, 2024

问题描述

使用Map会导致点击控件时也点击了底下的layer,同时触发控件和layer的click事件,没有优先级次序,但是使用Mapbox和高德Map GaodeMap就不会

重现链接

No response

重现步骤

No response

预期行为

当我想点击图层控制LayerSwitch控件时,却触发了底下PointLayer的click事件,导致弹出了对话框

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

image image

补充说明(可选)

No response

Copy link
Contributor

github-actions bot commented Jun 3, 2024

Hi @tsuyoii, Please star this repo if you find it useful! Thanks ⭐!
你好~ @tsuyoii 🌟 如果这个仓库对你有帮助,可以给我们点个star支持一下~你的支持对我们来说是最大的鼓励,感谢你的支持与点赞 🌟

@lvisei
Copy link
Member

lvisei commented Jun 3, 2024

一个 #2515 问题是吧?应该是一个事件绑定的问题,可以先使用 Maplibre,style 设置为 blank ,效果一样的

@lvisei
Copy link
Member

lvisei commented Jun 3, 2024

@tsuyoii
Copy link
Author

tsuyoii commented Jun 3, 2024

ok了,谢谢

@tsuyoii
Copy link
Author

tsuyoii commented Jun 4, 2024

image 今天发现点击图层控件这里也会出现透传的问题,且所有地图都有这个情况

@tsuyoii
Copy link
Author

tsuyoii commented Jun 4, 2024

目前暂时方案是 监听了Popper的show事件

@lvisei
Copy link
Member

lvisei commented Jun 11, 2024

@antv/l7@2.22.0 已修复

@lvisei lvisei closed this as completed Jun 11, 2024
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

2 participants