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

Query results should contain evaluated style properties #5677

Closed
jfirebaugh opened this issue Nov 14, 2017 · 1 comment
Closed

Query results should contain evaluated style properties #5677

jfirebaugh opened this issue Nov 14, 2017 · 1 comment
Labels

Comments

@jfirebaugh
Copy link
Contributor

The documentation for queryRenderedFeatures says:

Each feature includes a top-level layer property whose value is an object representing the style layer to which the feature belongs. Layout and paint properties in this object contain values which are fully evaluated for the given zoom level and feature.

The second sentence doesn't reflect the current behavior: currently, the layer objects in the results are just serialized layers, and serialize doesn't produce property values evaluated for the given zoom level or feature. You can confirm this via this example.

I agree with the intent of the documentation -- since you can already obtain the unevaluated property values via runtime styling APIs, it's more useful to get the evaluated properties. We should fix the behavior to match what's documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants