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

使用PointLayer添加点要素,点击事件触发位置不准确 #2552

Closed
a1329403800 opened this issue Jun 25, 2024 · 9 comments
Closed
Assignees
Labels
🤔 need reproduce issue 需要一个在线复现链接

Comments

@a1329403800
Copy link

问题描述

L7使用版本为:2.22.0,
加载点要素,后点击要素并不能弹出弹窗,需要点击要素靠上或者要素外上面一点才能触发点击事件。

重现链接

No response

重现步骤

No response

预期行为

No response

平台

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

屏幕截图或视频(可选)

default.mp4

代码截图

补充说明(可选)

No response

@lvisei
Copy link
Member

lvisei commented Jun 25, 2024

试试配置 pickingbuffer 属性。

@a1329403800
Copy link
Author

截图
不知配置是否正确 没有起作用

@lvisei
Copy link
Member

lvisei commented Jun 25, 2024

关掉配置,加一个 renderer 配置试试

const scene = new Scene({
		renderer: 'regl'
		...
});

@lvisei lvisei added the 🤔 need reproduce issue 需要一个在线复现链接 label Jun 26, 2024
Copy link
Contributor

Hello @a1329403800. Please provide a online reproduction by forking codesandbox of @antv/l7 demo template Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @a1329403800, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 @antv/l7 demo 模板 3 天内未跟进此 issue 将会被自动关闭。

@a1329403800
Copy link
Author

我尝试建立一个模板,遇到点问题,如何使用上传的图片作为点要素的形状呢?
代码截图 (2)

@a1329403800
Copy link
Author

大概就是使用图片创建点要素会使,点击事件不准确,而且好像会根据设置的偏移量同样偏移

@lvisei
Copy link
Member

lvisei commented Jun 27, 2024

我尝试建立一个模板,遇到点问题,如何使用上传的图片作为点要素的形状呢?

图片传 cdn 地址

@lvisei
Copy link
Member

lvisei commented Jun 27, 2024

据设置的偏移量同样偏移

还可以试试 2.22.0 以前的版本有没有问题。

@a1329403800
Copy link
Author

好像找到导致问题的原因了,使用高德地图作为地图时,没有问题,使用天地图时会出现上述问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 need reproduce issue 需要一个在线复现链接
Projects
None yet
Development

No branches or pull requests

2 participants