Skip to content

Conversation

@frenomus
Copy link

The main use case for this is when you are dynamically filtering markers that are being added into the cluster layer using chunked loading. With large marker sets it is possible for the filter conditions to change mid importation.

Previously, calling the clearLayers function would only clear markers already added. If the addLayers function was currently importing markers these would be added after the clearLayers function was called resulting in an unexpected state.

This PR essentially keeps a track of the number of times the clearLayers function was called, and aborts an addLayers process if it began when the call count was less than the current call count of clearLayers.

@frenomus frenomus changed the title Automatically aborts adding additional markers for an ongoing addLayers calls when the clearLayers function is called. Automatically aborts adding additional markers for an ongoing addLayers call when the clearLayers function is called. Aug 11, 2017
@danzel
Copy link
Member

danzel commented Aug 13, 2017

Could we get a test for this please?

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

Successfully merging this pull request may close these issues.

2 participants