How do I use lineSortKey in Mapbox iOS SDK?

40 views Asked by At

I can't find any examples of how to use lineSortKey, and testing with constants seems to indicate it's not working the way I assume. Where can I find more info on how to use this? Or can someone present an example?

And how does this interact with LayerPosition?

1

There are 1 answers

0
teradyl On

According to Ivan from the MapboxDevs discord:

lineSortKey allows to sort line features rendered by one layer. For example, you have 3 lines rendered by a LineLayer, every line is represented by a GeoJSON Feature with some property (sortKey). You make an expression that retrieves this value and assigns it to the layer.