-
Notifications
You must be signed in to change notification settings - Fork 506
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
fix Rectangle/Ellipse/Sector rotate not work #2130
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2130 +/- ##
==========================================
+ Coverage 83.65% 83.70% +0.04%
==========================================
Files 167 167
Lines 18579 18648 +69
==========================================
+ Hits 15542 15609 +67
- Misses 3037 3039 +2 ☔ View full report in Codecov by Sentry. |
@@ -955,6 +966,65 @@ class Geometry extends JSONAble(Eventable(Handlerable(Class))) { | |||
return this; | |||
} | |||
|
|||
_rotatePrjCoordinates(coordinates) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么旋转prj坐标而不是经纬度坐标?
- Rectangle等比较特殊,其绘制是坐标串,但是输入只有一个坐标点,所以单单旋转一个点是无法达到整体图形旋转的,最终效果变成了平移了 PolygonLayer中Rectangle与Cicrle坐标点z值表现异常,Rectangle rotate函数表现异常 issues#515
- 经纬度不是线型分布的,如果使用经纬度来旋转会导致坐标点相对于旋转中心点的夹角计算不对,故采用投影坐标
fix #2129
maptalks/issues#515