Skip to content

Geometry.Edit/Drag support altitude #2448

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

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

deyihu
Copy link
Collaborator

@deyihu deyihu commented Oct 29, 2024

fix #2294
fix maptalks/issues#768

Geometry 编辑支持携带海拔

@deyihu deyihu changed the title Geometry.Eidt/Drag support altitude Geometry.Edit/Drag support altitude Oct 29, 2024
@deyihu deyihu requested a review from fuzhenn October 29, 2024 06:33
@deyihu deyihu force-pushed the edit-support-altitude branch from ee2eb6e to 2a92675 Compare October 30, 2024 06:18
@fuzhenn
Copy link
Member

fuzhenn commented Oct 31, 2024

需要增加一下带海拔的Geometry的edit和drag的测试用例

coordiantes.z = 0;
const isPoint = !geometry.getGeometries && geometry.isPoint;
if (isPoint) {
coordiantes.z = altitude;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: coordiantes -> coordinates

@@ -1953,6 +1953,34 @@ export class Geometry extends JSONAble(Eventable(Handlerable(Class))) {
return this;
}

getEditCenter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这个方法只在editor或drag里用到,可以考虑方法名增加_,并加上 @internal 标签不公开出去

@deyihu
Copy link
Collaborator Author

deyihu commented Oct 31, 2024

需要增加一下带海拔的Geometry的edit和drag的测试用例

已经修改好 @fuzhenn

@fuzhenn fuzhenn merged commit e88bfe9 into maptalks:master Oct 31, 2024
1 check passed
@deyihu deyihu deleted the edit-support-altitude branch October 31, 2024 09:26
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.

VectorLayer 图层中的元素,使用 startEdit 编辑后,会丢失高度z。 Roadmap
2 participants