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

AnimatedCluster更新后动画消失? #1045

Closed
stdue opened this issue Mar 28, 2024 · 3 comments
Closed

AnimatedCluster更新后动画消失? #1045

stdue opened this issue Mar 28, 2024 · 3 comments

Comments

@stdue
Copy link

stdue commented Mar 28, 2024

我在使用AnimatedCluster的时候,在更新source时使用了setSource方法去更新数据,但是数据更新成功后动画的效果消失了,再次缩放只获得了僵硬的闪回,想问一下这属于bug吗?还是有更好的更新数据方法?

@stdue
Copy link
Author

stdue commented Mar 28, 2024

^4.0.15

Viglino added a commit that referenced this issue Mar 28, 2024
@Viglino
Copy link
Owner

Viglino commented Mar 28, 2024

Hello,
There is a bug if you change the ol/source/Cluster (there is no events on trigger on the new cluster source)
I fix it in the last commit...

Meanwhile, if you want to update the data, you have to change the source of the ol/source/Cluster instead of creating a new one.

clusterLayer.getSource().setSource(datasource)

@stdue
Copy link
Author

stdue commented Mar 28, 2024

thanks,good idea

@stdue stdue closed this as completed Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants