Supported versions
What the version matrix asserts on MapLibre GL JS 2–6 and Mapbox GL JS 1.13, and the Playwright floor.
Developed against MapLibre GL JS 6. The same small page and the same core specs run against every major below
(npm run test:compat, tests/compat/, its own CI job; 189 tests). "✓" means asserted by that matrix, not assumed.
Newer public methods are feature-detected, never version-sniffed; what an old version cannot do is said in failure
diagnostics and in the snapshot (note: …) instead of being answered wrongly, with one known exception on Mapbox GL
JS 1.13 (Limits): a GeoJSON source set again while it loads.
Playwright: @playwright/test 1.49 or later: CI runs the full suite on 1.49.0 (the floor) and on the current
version (0017).
| Mapbox GL JS 1.13 (BSD) | MapLibre 2 | MapLibre 3 | MapLibre 4 | MapLibre 5 | MapLibre 6 | |
|---|---|---|---|---|---|---|
assert: toHaveFeature, counts, where, .not | ✓ (one exception: Limits) | ✓ | ✓ | ✓ | ✓ | ✓ |
| act: click / hover / drag on features and locations, click-time verification | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
occlusion by other features and by DOM, force, ignoreLayers | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| visibility from paint evaluation (opacity 0, transparent colour, zero size) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
pixel probe (toBeVisibleOnMap, toHaveLayerPixels) | ✓ through the frame loop: 4 real frames, may flicker once | ✓ | ✓ | ✓ | ✓ | ✓ |
| text snapshot, evaluated colours, entities | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
markers and popups (map.marker, map.popup, toHavePopup) | ✓ (mapboxgl- classes) | ✓ | ✓ | ✓ | ✓ | ✓ |
vector-tile sources, routeVectorTiles | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
camera (toHaveView), toHaveGeometry | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
off-screen GeoJSON features: diagnostics, snapshot, autoPan: true | ✓ if the source was given an object; a URL: unknowable, and said so | same | same | ✓ | ✓ | ✓ |
| globe projection (far-side refusal, viewport-query workaround) | n/a | n/a | n/a | n/a | not in the matrix | ✓ (main suite) |
| terrain, fill-extrusion lift, touch, drawing tools, the wild apps | not in the matrix | not in the matrix | not in the matrix | not in the matrix | not in the matrix | ✓ (main suite) |
Mapbox GL JS v2 and later are proprietary and are not tested. The shared v1 API family suggests some compatibility, but this project makes no claim for those versions. Style expressions newer than the bundled evaluator are reported once and treated as visible; older expressions are supported.
What changed in each release is in the changelog.