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

Add animated streamline layer to spatial display #696

Merged
merged 6 commits into from
Feb 20, 2024

Conversation

ceesvoesenek
Copy link
Collaborator

No description provided.

@hvangeffen hvangeffen linked an issue Feb 14, 2024 that may be closed by this pull request
Copy link
Collaborator

@amarkensteijn amarkensteijn left a comment

Choose a reason for hiding this comment

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

Currently, there is still an error for some layers. For instance for http://localhost:5173/topology/node/waves/oceanographic_waves_swan/map/oceanographic_waves_swan, when switching to 'animated', it give an "Uncaught (in promise) RangeError: offset is outside the bounds of the DataView". When going to http://localhost:5173/topology/node/currents/oceanographic_currents_cmems/map/oceanographic_currents_cmems with 'CMEMS' and 'Animated' first, and then switching to 'Oceanographic' -> 'Waves', you do get a animated layer for Swan. Something to do with the time (by comparing the two requests).

src/components/wms/AnimatedStreamlineMapboxLayer.vue Outdated Show resolved Hide resolved
src/components/wms/AnimatedMapboxLayer.vue Show resolved Hide resolved
particleSize: streamlineOptions?.particleSize ?? 3,
speedFactor: streamlineOptions?.speedFactor ?? 0.2,
fadeAmountPerSecond: streamlineOptions?.fadeAmount ?? 0.1,
particleColor: `#${streamlineOptions?.particleColor}`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be better to set the '#' in the particleColor? That way, a particleColor of rgb(r,g,b) or 'black' would also be possible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it would be, but this is a back-end problem...

src/lib/streamlines/types.ts Outdated Show resolved Hide resolved
@ceesvoesenek
Copy link
Collaborator Author

(Force-)pushed changes, problems appear to be fixed.

Copy link
Collaborator

@amarkensteijn amarkensteijn left a comment

Choose a reason for hiding this comment

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

The multiple getMap request seems gone (or, at least, fewer).

However, when quickly switching between layers, I get an unexpected result:
Start at the Swan Waves animated layer:
image
Then, switch to WW3 and immediately switch back to Swan. I'd expect the exact layer (including times and colorrange etc) as before the switch. However, I get:
image
(This also still seems to trigger a double getMap request)

@amarkensteijn amarkensteijn merged commit 4c95e0b into main Feb 20, 2024
7 checks passed
@amarkensteijn amarkensteijn deleted the vue3-streamlines branch February 20, 2024 09:40
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.

Add streamlines
3 participants