Repository navigation
v2.2.1
Added
<MapGL onError>— called if map initialization fails (e.g.mapLib.supported()reports the environment can't run Mapbox/MapLibre GL JS, such as any WebGL-less context, or the underlyingnew mapLib.Map(...)constructor itself throws). Always logged viaconsole.errorin addition, so nothing is silently lost if this isn't provided.solid-map-gl/testing— a new entry point re-exporting this library's own internal mockmapboxgl.Map/maplibregl.Mapand<MapProvider>render helper (createMockMap,createMockMapLib,createMockDrawLib,renderWithMap,tick), the same test doubles this library's own test suite uses to render components without a real WebGL context. Requiresvitestand@solidjs/testing-library, both now optional peer dependencies.
Fixed
MapGL:onMount's async setup had no error handling, so a construction failure (e.g.mapLib.supported()returningfalse, reliably the case under Vitest/jsdom and any other WebGL-less environment) became an unhandled promise rejection instead of something a consumer could react to — and the viewport-sync effect had no!mapguard, so the very nextviewportprop update after such a failure threwTypeError: Cannot read properties of undefined (reading 'stop')on top of that. Both are now caught; seeonErrorabove.package.json'srepository.urlhad incorrect case, which broke npm Trusted Publishing's provenance verification for this release's first publish attempt.
Fixes #158.
Full Changelog: v2.2.0...v2.2.1