antvis / L7

🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis engine.
https://l7.antv.antgroup.com
MIT License
3.56k stars 625 forks source link

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

Closed a1329403800 closed 17 hours ago

a1329403800 commented 1 week ago

问题描述

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

重现链接

No response

重现步骤

No response

预期行为

No response

平台

屏幕截图或视频(可选)

https://github.com/antvis/L7/assets/43359344/1244d27f-5872-4293-97ea-5f9cb06136ca

代码截图

补充说明(可选)

No response

lvisei commented 1 week ago

试试配置 pickingbuffer 属性。

a1329403800 commented 1 week ago

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

lvisei commented 1 week ago

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

const scene = new Scene({
        renderer: 'regl'
        ...
});
github-actions[bot] commented 1 week ago

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 commented 6 days ago

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

a1329403800 commented 6 days ago

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

lvisei commented 6 days ago

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

图片传 cdn 地址

lvisei commented 6 days ago

据设置的偏移量同样偏移

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

a1329403800 commented 18 hours ago

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