Skip to content

v3.0.0-alpha.30

Pre-release
Pre-release

Choose a tag to compare

@maios maios released this 07 Sep 18:24
· 227 commits to main since this release

Warning

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 loadStyleJson support.

  • tileCover and Snapshotter.tileCover (experimental) now return OverscaledTileID instead of CanonicalTileID, matching the native SDKs and preserving overscaling and antimeridian distinctions.

  • Add experimental RasterLayer.rasterColorScale for more precise visualization of long-tailed raster-array data.

  • Promote SymbolLayer.symbolZOffset to stable.

  • Introduce the new StyleImage API for style images, replacing MbxImage-based methods.

    • StyleImage.bytes(...) accepts encoded PNG/JPEG/WebP directly
    • StyleImage also supports raw premultiplied RGBA pixels
    • StyleImage.fromImage(...) creates a style image from a dart:ui Image
    • addStyleImage, updateStyleImageSourceImage, and getStyleImage are deprecated in favor of addImage, updateImageForSource, and getImage, built on StyleImage.
    • getStyleImage (and deprecated wrappers around it) now return raw premultiplied RGBA pixel data instead of a PNG-encoded image, matching Android behavior.
    • MbxImage is 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.

Dependency Updates

  • Update Mapbox Maps SDK to v11.30.0
    • For platform-specific updates see: iOS & Android
  • Update GL JS to v3.30.0