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

Replace expressions with setFeatureState for choropleth and linestring vector tile visualizations #110

Open
ryanbaumann opened this issue Jun 25, 2018 · 0 comments

Comments

@ryanbaumann
Copy link
Contributor

Motivation

The data-join technique can be used in choropleth and linestring visualizations to join metadata to geometry in vector tiles over a unique identifier (or primary key). The data-join technique currently uses expressions to do the join, which is slow to execute when joining more than 10k or so features.

New feature

Use map.setFeatureState() released in GL JS v0.46 to perform the data-join technique. map.setFeatureState() requires a unique integer id value to be included with the vector tile source. Here's an example - https://bl.ocks.org/ryanbaumann/733ba99c5ca1d9d15259081b395e4b00

Issues

  • Since setFeatureState supports id values only, vector tiles must be created with this id in them in order to use setFeatureState().
  • id values only support integers, so there would need to be an intermediate mapping table to join data between string values and integer id values.
  • The difference between expressions and setFeatureState() data-join techniques should be hidden from the end user of the visualization library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant