Render style
render_styleRender a MapLibre style to a PNG image and report style errors, failed requests, and missing fonts or icons.
Instructions
Renders a MapLibre style to a PNG image, so you can see what the style looks like, for example after changing it. Also reports what the renderer noticed, such as style errors, failed requests, and fonts and icons that are missing. Pass the style as an object, a URL or a file path. Without center, zoom or bounds, the camera stored in the style is used. For a view over 3D terrain, cameraPosition and lookAt place the camera in space, and the result gives the center, zoom, bearing and pitch of that view to store in the style.
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 | ||
| pitch | No | Tilt in degrees from looking straight down. | |
| style | No | The style as a JSON object. | |
| width | No | ||
| bounds | No | [west, south, east, north] to fit the map to, instead of center and zoom. | |
| center | No | [longitude, latitude] of the map center. | |
| height | No | ||
| lookAt | No | [longitude, latitude] of the point on the ground that the camera at cameraPosition looks at, like a summit or a village. | |
| bearing | No | The compass direction at the top of the map, in degrees. | |
| renderer | No | The MapLibre renderer to draw with. | gl-js |
| cameraPosition | No | [longitude, latitude, altitude in metres] of the camera, to place it in space instead of with center, zoom, bearing and pitch. Needs lookAt. |