feat(tileset): Improve filter and spatial filter API for tilesets #103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For tilesets, filters cannot be specified in source functions like
vectorTilesetSource
. Both filters and spatial filters need to be applied in a pre-pass on the tile data, before computing widget results. In #50 this was originally set up similarly to C4R, with three distinct steps for (1) loading tiles, (2) extracting tile features, and (3) computing results. For simpler usage, we'd like to hide step (2), and in most cases users can simply do this:For the less common cases where the storeGeometry or uniqueIdProperty options need to be specified, that can be done once, and doesnt need to be reconfigured when new tiles are loaded: