2
votes

Using mapbox gl js.

I have set all my custom mapbox style layers zoom settings to be max range [0, 22] in mapbox studio. But layers are not visible after reaching 6-8 zoom levels on zoom-out.

It seems that mapbox understand automatically somehow that there is no reasot to show polygons anymore because they are too small and hides them.

What is exact case and where could i read about this? (didn't find anything in docs)

2

2 Answers

1
votes

The style settings consist of two important components:

  1. the sources
  2. the style layers

If you tell your style layers they should display on all zoom levels but the sources are missing data for some of these zoom levels, then the corresponding style layer won't work.

Reasons why some layers do not display data for some zoom levels:

  • the view zoom level is smaller than the source zoom level range (if set)
  • the source does not contain data for the given zoom level
0
votes

I got the same problem and solved by adding "icon-allow-overlap": true to the layer

 layout={{
            "icon-image": "image",
            "icon-size": 0.8,             
            "icon-allow-overlap": true,
          }}