-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
clarify geometry-type
expression behavior for vector tile sources
#7699
Comments
I wonder whether it makes sense to differentiate between Multi and Single geometries in the context of a Mapbox style — perhaps we should do the other way around and fix GeoJSON to return It's definitely a design omission — we should have thought this out to be consistent. The only problem with fixing this is that it's a breaking change, so perhaps updating the docs would be an easier first step, assuming a follow-up. |
@HeyStenson's commit provides the documentation fix. Added to #6584 so we can revisit the breaking change in the next style spec version. |
Problem
The documentation for
geometry-type
in the spec (mapbox-gl-js/src/style-spec/reference/v8.json
Line 2738 in 64ebdda
Based on a quick experiment, it doesn't appear like the
geometry-type
expression ever returns a multi* feature when applied to a vector tile source.Suggestion
There's likely more nuance going on here than I'm aware of – in which case, the appropriate explanation in the appropriate place would solve this issue better than anything I can come up with. Here are some suggestions based on what I know:
geometry-type
to return true for multi-features in both vector tile and GeoJSON source types.The text was updated successfully, but these errors were encountered: