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

Feature Request: Option to promote a geojson feature property to top level ID #660

Closed
samgehret opened this issue Nov 2, 2018 · 3 comments

Comments

@samgehret
Copy link

With the introduction of setFeatureState into GL-JS, it is increasingly important to have control over the top level ID of features within a vector tile.

Take the following example: I download a shape file from the census website, convert it to geojson, run through tippecanoe, and upload to mapbox as a vector tile. Now I want to use setFeatureState to style the polygons in the vector tile. But I cannot, because the top level IDs of the polygon features are generated sequentially/randomly.

It would be great, if running my geojson through tippecanoe, if I could choose which of the geojson properties would be promoted to the top level ID of each feature.

cc @ericfischer

@e-n-f
Copy link
Contributor

e-n-f commented Nov 2, 2018

OK, I can add a --use-attribute-for-id option that will treat a specified feature attribute as if it were the id field.

@e-n-f
Copy link
Contributor

e-n-f commented Nov 2, 2018

OK, this will also be in #658.

@e-n-f
Copy link
Contributor

e-n-f commented Nov 7, 2018

Merged

@e-n-f e-n-f closed this as completed Nov 7, 2018
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

No branches or pull requests

2 participants