Skip to content
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

#9352 Add new drawing/modify interaction component supports #9353

Merged
merged 38 commits into from
Sep 6, 2023

Conversation

allyoucanmap
Copy link
Contributor

Description

This PR implements draw and modify components that could be used for Cesium and OpenLayers. This new components will be used inside the refactor of Annotations

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Feature

Issue

What is the current behavior?

#9352

What is the new behavior?

Introduced drawing and modify support for Cesium and a new components for OpenLayers

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

Other useful information

@allyoucanmap allyoucanmap added annotations related to the annotation tool New Feature used for new functionalities 3D All issues related to the 3D rendering in CesiumJs C027-COMUNE_FI-2023-SUPPORT labels Aug 23, 2023
@allyoucanmap allyoucanmap added this to the 2023.02.00 milestone Aug 23, 2023
@allyoucanmap allyoucanmap self-assigned this Aug 23, 2023
@allyoucanmap allyoucanmap linked an issue Aug 23, 2023 that may be closed by this pull request
3 tasks
@tdipisa tdipisa modified the milestones: 2023.02.00, 2024.01.00 Aug 31, 2023
Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Apart from the changes to interfaces already agreed, the only changes regards typos or improvements to doc readability.

* @prop {function} onEditEnd triggered one the editing has been completed
* @prop {function} toEditProperties convert properties of feature to edit properties geometryType, geodesic and radius are needed to compute the editing. geometryType could be: Point, LineString, Polygon or Circle
* @prop {function} fromEditProperties restore properties of the feature to the original one
* @prop {number} mouseMoveThrottleTime throttle value to limit the mousemove event callback and improve the interaction, default 100ms
Copy link
Member

Choose a reason for hiding this comment

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

  • The default has been removed. Is it still valid as 100ms? Does it make sense to expose it? It is specific only of cesium.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it from the props so it's not exposed and 100ms by default

Comment on lines 147 to 150
this._fromEditProperties = options.fromEditProperties ? options.fromEditProperties : (editProperties, feature) => ({
...feature?.properties,
...(editProperties?.radius !== undefined && { radius: editProperties.radius })
});
Copy link
Member

Choose a reason for hiding this comment

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

Move this in common between functions as default

web/client/utils/cesium/DrawGeometryInteraction.js Outdated Show resolved Hide resolved
@@ -7,6 +7,7 @@
*/

import * as Cesium from 'cesium';
import earcut from 'earcut';
Copy link
Member

Choose a reason for hiding this comment

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

Is this lib included? I can not see it package.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@offtherailz I think it's included by cesium, if you want I can add it in the package.json?

web/client/utils/openlayers/DrawGeometryInteraction.js Outdated Show resolved Hide resolved
web/client/utils/openlayers/ModifyGeoJSONInteraction.js Outdated Show resolved Hide resolved
allyoucanmap and others added 16 commits September 5, 2023 14:10
Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Nice speed up of the tests. great job

@offtherailz offtherailz merged commit ad38723 into geosolutions-it:master Sep 6, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D All issues related to the 3D rendering in CesiumJs annotations related to the annotation tool C027-COMUNE_FI-2023-SUPPORT New Feature used for new functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new drawing/modify interaction component supports
3 participants