Reputation: 13
I do have a wfs source and a cluster source in a vector layer. From time to time I know that something changed in the serverside wfs source, so I want to update the vector layer to show the new features. How can I trigger an update of the wfs layer without interaction of the user (especially change resolution)?
An clear()
on the cluster source or the vector source or any combination of it did not help. Also a changed()
or a map.render()
did not work.
I would like to trigger somehow the loader-function of the vector source.
Thanks for help!
Upvotes: 0
Views: 466
Reputation: 3142
This is related to a known issue: https://github.com/openlayers/ol3/pull/3917
I'd suggest using the change from the pull request above in a custom build, which should enable you to reload the layer (and the cluster) by calling clear on the base source.
Alternatively, you could initialize a new cluster source each time you call clear on the base source, and replace the cluster source by calling setSource on the layer.
Upvotes: 0