Releases: dimfeld/svelte-maplibre
v1.0.0-next.8
Set a z-index on Popup so it shows up above DeckGlLayer, which changed with the upgrade to DeckGl's new Maplibre integration.
v1.0.0-next.7
Work around sveltejs/kit#13098 on VectorTileSource import.
v1.0.0-next.6
Always attach an error handler to the map, even if onerror
is not provided.
If onerror
is provided, the handler will just call it. Otherwise it will print the error to the console, except for AbortError
, which seems to always happen when loading a remote geojson source, and isn't useful to log.
v1.0.0-next.4
Export all the new functions in context.svelte.ts
from the top-level export file. You can still also reference these by importing from svelte-maplibre/context.svelte.js
.
v1.0.0-next.3
- Fixed infinite effect loop in
JoinedData.svelte
- Fixed infinite effect loop in
Terrain.svelte
- Fix tearing down DeckGlLayer.
- Other minor cleanup
For full release notes for 1.0RC, see https://github.com/dimfeld/svelte-maplibre/releases/tag/v1.0.0-next.1
Svelte 5 native support and other changes
This is a release candidate for svelte-maplibre 1.0. I believe everything is done but want to let it soak a bit before publishing.
See the demo site here.
This release not only upgrades to Svelte 5, but also integrates a few other breaking changes I've wanted to make:
- All the code in the package was moved to runes (thanks @benmccann for the nudge), so Svelte 5 is now required.
- Event handlers are now functions passed as props, in Svelte 5 style. The main difference that you will find is that instead of using
event.detail
, the data for an event will just be present onevent
. - Events no longer have the map attribute added to them since this is already present as
event.target
- For anyone implementing their own layer components, the context structure has changed a lot. See
context.ts
for more details - Update deck.gl dependency to v9. Deck.gl's support for Mapbox and Maplibre is completely different between v8 and v9. This release does not change the interface in a breaking way, aside from the new version requirement. A future release will publish a new Deck.gl layer component which better integrates with the new support.
- Many of the uses of
null
in the package have been changed toundefined
, which works better with Svelte's prop handling in some cases.
The old Svelte-4-compatible version will probably not get any new features, but for a while I will try to port significant bug fixes back to there as they are made.
Major Changes
-
#214
0485a6a
Thanks @dimfeld! - Removemap
attribute from events. It was already present astarget
-
#214
0485a6a
Thanks @dimfeld! - Upgrade internal code to Svelte 5 runes -
#214
0485a6a
Thanks @dimfeld! - Internal: Change context structure used to pass info down the component hierarchy -
#214
0485a6a
Thanks @dimfeld! - Useundefined
instead ofnull
in many places. This improves ergonomics with Svelte component props.