Compare styles
compare_stylesRender two MapLibre styles at the same camera view to see before, after, and differences in red, verifying style changes have no unintended effects.
Instructions
Renders two versions of a MapLibre style at the same camera, and returns one image with the style before, the style after, and their differences in red. Use it after changing a style, to check that the change did what you meant and nothing else, at a few places and zoom levels. Pass each style as an object, a URL or a file path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zoom | No | ||
| after | Yes | The style after the change. | |
| pitch | No | Tilt in degrees from looking straight down. | |
| width | No | Width of each of the three images. | |
| before | Yes | The style before the change. | |
| 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 | ||
| bearing | No | The compass direction at the top of the map, in degrees. | |
| renderer | No | The MapLibre renderer to draw both with. | gl-js |