DocsSupported versions

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 2MapLibre 3MapLibre 4MapLibre 5MapLibre 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 sosamesame✓✓✓
globe projection (far-side refusal, viewport-query workaround)n/an/an/an/anot in the matrix✓ (main suite)
terrain, fill-extrusion lift, touch, drawing tools, the wild appsnot in the matrixnot in the matrixnot in the matrixnot in the matrixnot 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.