antvis / antvis/L7

父元素有transform:scale()属性,地图上点击的位置与实际跳转的位置不符

Open
#1,724 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.1k
Forks
656
PR merge metrics
No merged PRs in 30d

Description

我会在点击地图某个位置时,获取当前点击的经纬度,并按照这个经纬度设置中心点和zoom。
但在父元素有transform:scale()属性时,获取的点击经纬度有偏移,导致移入的中心点并不在当前点击的位置,请问有什么解决办法吗?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the map click handling that reads the clicked longitude and latitude, then compare its coordinate conversion when an ancestor has CSS transform:scale(). Reproduce the reported offset and verify that recentering and zooming place the map at the clicked location.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.