Skip to content

DataFilterExtension filter data randomly depending on the zoom #8963

Answered by Pessimistress
am2222 asked this question in Q&A
Discussion options

You must be logged in to vote

If your data is distributed uniformly you could try assign each point a random number:

getFilterValue: d => Math.random(),
filterRange: [0, 1 - 2 ** (-zoom)]

Otherwise CollisionFilterExtension will work in a more controlled fashion.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Pessimistress
Comment options

@am2222
Comment options

@Pessimistress
Comment options

@am2222
Comment options

@am2222
Comment options

Answer selected by am2222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants