-
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
Add *-sort-key layout property for circle, fill, line #8467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good,.
Mostly had a question about the sortFeaturesByKey
flag added to each bucket. Is it really needed?
I think the flow-type errors related to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Thanks for these latest changes
This pull request adds support for three new style-spec layout properties: circle-sort-key, line-sort-key, and fill-sort-key.
These properties mirror the symbol-sort-key in terms of function and allow for features of circle, line, or fill type to specify their own sort order. Sort keys are expected to be float values in ascending order (back to front). Features with larger sort keys will be drawn in front of features with smaller sort keys.
Addition of the sort key property was motivated by cross-tile draw order issues for symbol and circle layers. Line and fill do not suffer from the same cross-tile sorting issues, but these properties are still useful for designers and are supported for flexibility and consistency.
@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes@mapbox/gl-native
if this PR includes shader changes or needs a native port