My mapbox app consists of a basemap and geojson polygon layer. I want nice labels on top of each polygon, but nothing I have tried works

I've tried adding label point layer as geojson and MBTile, making z-index = 99, but the geojson polygons are always on top.

Is there a sure fire method for forcing polygon labels to top layer?

Here is the map


Add the layer from your GeoJSON source before the labels layer. According to the Mapbox GL Style Spec layers are drawn in the order in which they're listed in the layers array.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.