1

I would like to order "circle" features in a layer in Mapbox studio. The entire Style, including this layer and other layers, is added to a map using GL.JS, and symbology for the layers are set in studio.

I see the documentation for circle-sort-key for gl-js style specification, but don't see where to set it along side the other properties (raduis, color, opacity, etc) for the layer style in studio.

JMers
  • 175
  • 8

2 Answers2

2

Yes, it appears you can't set it within Studio.

However, you can set it using JS if you want:

map.setLayoutProperty('mylayer', 'circle-sort-key', ...)

Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
0

Since the documentation doesn't give a detailed example, I'm adding my final solution here. Following @steve-bennett's suggestion, to sort the smallest circles on top:

map.setLayoutProperty('layername','circle-sort-key',["*", -1, ["get", "propertyname"]])
JMers
  • 175
  • 8