Skip to content

Conversation

@deyihu
Copy link
Collaborator

@deyihu deyihu commented Sep 17, 2025

fix #1439

问题:当坐标点(gl)在相机背后时,转换出来像素坐标不对

  • 点数据是没有问题,因为这时点不在视野内,即使不对也看不出来
  • 但是path就不行了,当一个点在视野内,另一点在相机背后时就会出现问题(红色的是gllayer,黑色的是canvaslayer)
B74_6PVUGHSF(D~KGGRKKI3

解决方法:凡是在相机背后的点,一律利用相机近距离的线给裁掉,使点不会在相机背后很远的地方

2GW(KQ7D54{6DLGLA$6EH8L

这个功能默认关闭:需要是可以 开启strictClip

    const line = new maptalks.LineString(coordinates, {
                enableClip: false,
                strictClip: true,
                symbol: symbol
            }).addTo(layer);

@deyihu deyihu requested a review from fuzhenn September 17, 2025 02:27
@deyihu deyihu closed this Sep 17, 2025
@deyihu deyihu reopened this Sep 17, 2025
@fuzhenn fuzhenn merged commit a7e7247 into maptalks:master Sep 18, 2025
3 checks passed
@deyihu deyihu deleted the path-clip branch September 18, 2025 11:24
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

Successfully merging this pull request may close these issues.

扩大剪裁范围后,图形绘制不正确了

2 participants