Debug layers
debug_layersDiagnose why map layers draw nothing at a given place and zoom, checking visibility, zoom range, filters, opacity, icons, glyphs, and tile source data.
Instructions
Says for each layer of a style whether it draws anything at a place and zoom, and when it draws nothing, why: it is hidden or outside its zoom range, the tile lacks its source layer, its filter matches no feature (listed with the values the tile has), a fill layer gets no polygons, its opacity, width or size is 0 or its color transparent, or icons are missing from the sprite. It also notes text that GL JS draws with local fonts and MapLibre Native leaves out, because the style has no glyphs URL or the glyph server lacks its font stack. It reads the vector tiles and GeoJSON data at the place. Use it when a layer draws nothing. Pass the style as an object, a URL or a file path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL of a style JSON document. | |
| path | No | Path to a style JSON file, relative to the directory the server runs in. | |
| zoom | No | Zoom level. Defaults to the zoom of the style. | |
| style | No | The style as a JSON object. | |
| center | No | [longitude, latitude] of the place. Defaults to the center of the style. | |
| layers | No | Only check these layers, by id. Defaults to every layer. |