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

PB-722 : Cesium rework #1086

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

PB-722 : Cesium rework #1086

wants to merge 13 commits into from

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Oct 2, 2024

Rewriting the whole thing into Composition API, and fixing / improving many things in the process

I tried to apply the same logic as what we did with all OpenLayers component, naming them as their OL equivalents.
The only thing I found hard to do the same was camera and click/interaction management. As we have to wait for some condition to be met before initializing (Mercator) adding these two as composable was not ideal, as they also had to have this logic. So instead I've created components that are added when the viewer is created.

I took the opportunity to remove our shallow copy of ol-cesium that was there to translate GeoJSON style into Cesium equivalent, and wrote something tailor made for us. I tested with Meteoschweiz layers, don't hesitate to try all the GeoJSON you know!

Test link

@github-actions github-actions bot added the bug label Oct 2, 2024
Copy link

cypress bot commented Oct 2, 2024

web-mapviewer    Run #3470

Run Properties:  status check passed Passed #3470  •  git commit 761770ab56: PB-722 : fix e2e test with new way of loading GeoJSON in 3D
Project web-mapviewer
Branch Review fix-PB-722-cesium-rework
Run status status check passed Passed #3470
Run duration 04m 36s
Commit git commit 761770ab56: PB-722 : fix e2e test with new way of loading GeoJSON in 3D
Committer Pascal Barth
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 21
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 211
View all changes introduced in this branch ↗︎

pakb added 12 commits October 3, 2024 09:41
and get rid of the ol-cesium copy we have
like with OL, keeping all the logic for each group isolated from the main component
As refs on child component in the context of Composition API don't give the HTML element anymore, I had to export the size of the MapPopover component in its defineExpose (CesiumPopover needs to know the width of the popover to place it correctly)
that fixes the issues we had with touch device navigation in 3D
one for the camera management, one for mouse/click interaction
transforming the whole thing into Composition API in the process
labels weren't showing without it
and fly to new camera position only if different than current position (should remove the little extra "move" that could be felt at the end of a mouse drag)
Rework of the GeoJSON style converter, so that it can deal with triangle/square (any non-circle) shapes by using the OL icon generator we already have in the code.

Adding support for opacity for all 3 types of layers (GeoJSON, KML and GPX)

Clamping internal KMLs (from the drawing module) to the ground for better readability. keeping external non-clamped, so that they may give use the height (z coordinate). We do not use this z axis on drawing, so it makes sense that we clamp our stuff to the ground.
@pakb pakb changed the title PB-722 : Cesium touch device fix PB-722 : Cesium rework Oct 3, 2024
now using the viewer dataSources instead of loading everything in the scene's primitives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant