Repository navigation
v3.0.0-alpha.30
Pre-releaseWarning
This is an alpha release. APIs may change before the stable release. Not recommended for production use.
What's new ✨
-
Remove APIs deprecated in v2. See the migration guide for upgrade instructions.
-
[web] Add
MapboxMap.snapshot()support. -
[web] Add
loadStyleJsonsupport. -
tileCoverandSnapshotter.tileCover(experimental) now returnOverscaledTileIDinstead ofCanonicalTileID, matching the native SDKs and preserving overscaling and antimeridian distinctions. -
Add experimental
RasterLayer.rasterColorScalefor more precise visualization of long-tailed raster-array data. -
Promote
SymbolLayer.symbolZOffsetto stable. -
Introduce the new
StyleImageAPI for style images, replacingMbxImage-based methods.StyleImage.bytes(...)accepts encodedPNG/JPEG/WebPdirectlyStyleImagealso supports raw premultipliedRGBApixelsStyleImage.fromImage(...)creates a style image from adart:uiImageaddStyleImage,updateStyleImageSourceImage, andgetStyleImageare deprecated in favor ofaddImage,updateImageForSource, andgetImage, built onStyleImage.getStyleImage(and deprecated wrappers around it) now return raw premultipliedRGBApixel data instead of a PNG-encoded image, matching Android behavior.MbxImageis deprecated and will be removed in a future release.
// v2 — MbxImage, manual RGBA decode required final decoded = img.decodeImage(pngBytes)!; await mapboxMap.style.addStyleImage( 'my-icon', 1.0, MbxImage( width: decoded.width, height: decoded.height, data: decoded.getBytes(order: img.ChannelOrder.rgba), ), ); // v3 — StyleImage, pass encoded bytes straight through await mapboxMap.style.addImage( 'my-icon', 1.0, StyleImage.bytes(pngBytes), ); // v3 — or build one from a dart:ui Image await mapboxMap.style.addImage( 'my-icon', 1.0, await StyleImage.fromImage(uiImage), );
Platform API coverage
Web support is actively being developed. Not all APIs available on iOS and Android are supported on web yet — full parity is coming in future releases. APIs that are not available on a given platform will throw UnimplementedError at runtime.