Repository navigation
Add *-sort-key layout property for circle, fill, line - #8467
Conversation
asheemmamoowala
left a comment
There was a problem hiding this comment.
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 |
ansis
left a comment
There was a problem hiding this comment.
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/studioand/or@mapbox/maps-designif this PR includes style spec changes@mapbox/gl-nativeif this PR includes shader changes or needs a native port