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

FlowLine - How to get the exact location of the current drawing step in color function? #1116

Open
downace opened this issue Dec 23, 2024 · 2 comments
Labels

Comments

@downace
Copy link

downace commented Dec 23, 2024

Looks like the color function is called only for visible segments, but the step value is always in [0,1] range, so it's not consistent and can't be used to identify the exact location on the map.

Reproduction: https://codesandbox.io/p/sandbox/hnvgwt

Reproduction GIF

1

As a workaround I could use visible: false (FLowLine) and updateWhileAnimating: true (VectorLayer), but

the setting will have a performance impact for large amounts of vector data.

@downace

This comment was marked as off-topic.

@Viglino
Copy link
Owner

Viglino commented Dec 23, 2024

Yes, it is an optimization to calculate only on visible part. visible: false will use the whole geometry but is less efficient...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants