1
votes

I'm following this example:

https://www.mapbox.com/mapbox-gl-js/example/multiple-geometries/

For each feature / shape on the map, they draw a new layer. However, I want to make "set" of features per Geojson I'm rendering on the map to be its own layer. Is it possible to group them somehow?

1

1 Answers

2
votes

In Mapbox GL, each layer is associated with exactly one "shape" (circle, line, symbol, fill, raster, or fill-extrusion). It is not possible to render multiple "shapes" per layer.

You can control which features are rendered in a particular layer using filters.

Does that provide any more clarity? Can you describe specifically what you're trying to do?