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

#10225: Enhance UX for simple 3D navigation in touch devices [Implementation via Config-level] #10261

Merged
merged 4 commits into from
May 17, 2024

Conversation

mahmoudadel54
Copy link
Collaborator

@mahmoudadel54 mahmoudadel54 commented Apr 26, 2024

Description

In this PR, the required enhancements are implemented but within the config-level by adding some cfg for cesium mapOptions to enhance UX of navigation.
In includes:

  • Handle disable tilt effect
  • Handle enabling zoom limits max, min or both
  • Handle enabling fixing orientation of the map scene
  • Handle enabling hiding the compass UI widget [will disable tilt effect as well]
  • Handling quick reset to the initial camera scene stored into map object

Please check if the PR fulfills these requirements

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

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

#10225
What is the current behavior?
#10225

Breaking change

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

  • Yes, and I documented them in migration notes
  • No

Other useful information

There are 2 notes need to highlighted:
1- For the point Quick reset of the 3D map view (the camera view) to restore the initial state, I have checked the implementation of zoomToExtent button and I found out as an enhancement for 3D mode only, we can pass the viewerOptions object - that includes orientation and destination objects - to the zoomTo action which will do the same required functionality.

But If the required logic is keeping zoomTo extent implementation as it is currently and extending the functionality by adding the new functionality in a separate place, it is Ok.

2- For the point of fix camera orientation limits and/or fixed camera orientation, When I enable fix camera orientation enableFixedOrientation: true and disableTilt = true, the tilt doesn't disable.
It enables the tilt effect by default. so there will be conflict between disabling tilt and fix camera orientation.

Description:
- Add some cfg for cesium mapOptions to enhance UX of navigation
- Handle disable tilt effect
- Handle enabling zoom limits max, min or both
- Handle enabling fixing orientation of the map scene
- Handle enabling hiding the compass ui widget
- Handling quick reset to the initial camera scene stored into map object
@mahmoudadel54 mahmoudadel54 added enhancement investigation BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch C299- POLITO -2023-MS_DigitalTwin labels Apr 26, 2024
@mahmoudadel54 mahmoudadel54 added this to the 2024.01.01 milestone Apr 26, 2024
@mahmoudadel54 mahmoudadel54 self-assigned this Apr 26, 2024
@mahmoudadel54 mahmoudadel54 linked an issue Apr 26, 2024 that may be closed by this pull request
6 tasks
@mahmoudadel54
Copy link
Collaborator Author

mahmoudadel54 commented Apr 30, 2024

Hi
These are some simple demos demonstrating the UI implementation. I add the configuration into localConfig.json file into defaultMapOptions object --> cesium -->
image

1- configure enableFixedOrientation: true

enableFixedOrientation.by.true.demo.mp4

2- configure disableTilt: true

disable.tilt.by.true.demo.mp4

3- configure hideCompass: true

hideCompass.by.true.demo.mp4

4- configure enableQuickResetTo3DView: true

enableQuickResetTo3DView.by.true.demo.mp4

5- configure zoomLimits: { "min": 20000, "max": 20000000 }

zoomLimits.min.and.max.demo.mp4

web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/plugins/Map.jsx Outdated Show resolved Hide resolved
web/client/plugins/Map.jsx Outdated Show resolved Hide resolved
web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/plugins/Map.jsx Outdated Show resolved Hide resolved
@mahmoudadel54 mahmoudadel54 changed the title #102251: Enhance UX for simple 3D navigation in touch devices [Implementation via Config-level] #10225: Enhance UX for simple 3D navigation in touch devices [Implementation via Config-level] May 10, 2024
…evices [resolve review comments]

Description:
- remove unused/unnecessary code based on code reviews
- edit zoom to initial view button to enable zoom to camera view
- edit translations of the label of zoomAll plugin
- rename zoomDistance map options + edit jsDoc
…evices [resolve review comments]

Description:
- fix FE failure by update a unit test of ZoomToMaxExtentButton
…evices [resolve review comments]

Description:
- edit translation in en-US
web/client/translations/data.en-US.json Outdated Show resolved Hide resolved
@allyoucanmap allyoucanmap merged commit 37343a1 into geosolutions-it:master May 17, 2024
6 checks passed
@allyoucanmap
Copy link
Contributor

@ElenaGallo please test on dev and let us know if we can backport to 2024.01.xx, thanks

@mahmoudadel54
Copy link
Collaborator Author

@ElenaGallo please test on dev and let us know if we can backport to 2024.01.xx, thanks

Hi @ElenaGallo

The results of this PR you can test [they are just 2 things]:

  • maximumZoomDistance, minimumZoomDistance properties can be appended into mapOptions in localConfig and you can see its effect
  • zoom to initial view [zoomToExtent button] in the bottom navigation toolbar, you can see the difference in 3D mode

For the rest points mentioned on the issue description, they may be in separate future issues.

@ElenaGallo
Copy link
Contributor

Test passed, @mahmoudadel54 please backport to 2024.01.xx. Thanks

mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this pull request May 22, 2024
tdipisa pushed a commit that referenced this pull request May 22, 2024
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance UX for simple 3D navigation in touch devices
4 participants