Skip to content

Releases: maplibre/flutter-maplibre-gl

v0.24.1

20 Oct 16:15
95a8535

Choose a tag to compare

What's Changed

Added

  • Added onCameraMove callback in the controller and in MapLibreMap class. (#643)

Changed

  • Rollback maplibre-gl to 4.7.1 version. (#660)

Fixed

  • Annotation tap call callbacks twice. (#652)
  • Annotation APIs: use null-aware access for manager-backed collections (symbols, lines, circles, fills) to avoid null errors before style load. (#657)
  • Add methods enforce explicit manager initialization with clear exceptions when style is not loaded. (#657)
  • Calling add* before style load now fails fast with a clear Exception instead of risking null dereferences or silent failures. (#657)

A big thank you to everyone who contributed to this update!

Contributors: @andynewman10, @andrea689, @gabbopalma
Full Changelog: v0.24.0...v0.24.1

v0.24.0

02 Oct 00:38
d570358

Choose a tag to compare

What's Changed

Note

This release has breaking changes.
We apologize for the quick change in 0.24.0: this version definitively stabilizes the signatures of feature interaction callbacks.

This release restores the feature id and makes the Annotation parameter nullable for all feature interaction callbacks (tap / drag / hover).
This unblocks interaction with style-layer features not managed by annotation managers (i.e. added via addLayer* / style APIs).

Warning

Breaking Changes

  • Tap: OnFeatureInteractionCallback(Point<double> point, LatLng coordinates, String id, String layerId, Annotation? annotation).

  • Drag: OnFeatureDragCallback(Point<double> point, LatLng origin, LatLng current, LatLng delta, String id, Annotation? annotation, DragEventType eventType).

  • Hover: OnFeatureHoverCallbackPoint<double> point, LatLng coordinates, String id, Annotation? annotation, HoverEventType eventType).

  • Update existing listeners: The short‑lived 0.23.0-only signatures (without id) are removed.

    • For unmanaged style layer features annotation is null (unmanaged means sources/layers you add via style APIs like addGeoJsonSource + addSymbolLayer).
    • For managed annotations it is the Annotation object.

Reasoning

In 0.23.0 the move to annotation objects inadvertently dropped interaction for unmanaged style features. Reintroducing id (and making annotation nullable) normalizes all three interaction paths without creating phantom annotation wrappers.

Migration Example

Before (0.23.0):

controller.onFeatureTapped.add((p, latLng, annotation, layerId) {
  print(annotation.id);
});

After (>=0.24.0):

controller.onFeatureTapped.add((p, latLng, id, layerId, annotation) {
  print('feature id=$id managed=${annotation != null}');
});

Refactor / Quality

  • (web) Refactored onMapClick (degenerate bbox + interactive layer filter) to surface features inserted via style APIs (unmanaged style-layer features) in onFeatureTapped (previously skipped; returned now with id, layerId and annotation = null) (#646).
  • (web) Ensure map container stretches vertically by adding style.height = '100%' to the registered div (prevents occasional zero-height layout issues in flexible parents) (#641)

Contributors: @andynewman10, @gabbopalma
Full Changelog: v0.23.0...v0.24.0

v0.23.0

30 Sep 22:44
46a1925

Choose a tag to compare

v0.23.0 Pre-release
Pre-release

What's Changed

Caution

USE 0.24.0 VERSION INSTEAD OF THIS ONE!

This consolidated release delivers runtime style switching, hover interactions, heatmap & visibility features, native SDK updates, and broad naming / enum casing harmonization. It also fixes several interaction and stability issues across web and mobile.

If you are upgrading from <= 0.22.x:

  • Review the breaking rename (Maplibre -> MapLibre) and enum / const lowerCamelCase migration.
  • Adapt feature interaction callbacks: onFeatureTapped / onFeatureDrag now receive an Annotation instead of an id argument.
  • Ensure any style access happens after onStyleLoaded due to stricter style readiness checks.

A big thank you to everyone who contributed to this update!

Warning

Breaking changes

  • Rename Maplibre to MapLibre across APIs (#441).
  • Enum fields & const identifiers migrated to lower camel case (#415).
  • onFeatureTapped / onFeatureDrag replaced the raw id parameter with an Annotation annotation instance (update handler signatures).

Added / Features

  • Runtime style switching APIs on controller (#444) and raw style JSON setting on iOS / Web (#603).
  • Hover interaction events (onFeatureHover) (#614).
  • Heatmap layer support (#365).
  • Bounds fitting API to change viewport to given bounds (#133).
  • Layer visibility control (#138).
  • LatLngBounds.contains convenience (#498).

Changed / Updates

  • MapLibre Native: Android 11.13.5 & iOS 6.19.1.
  • Flutter / Gradle plugin & tooling compatibility update (#542).
  • Lint and analysis alignment via very_good_analysis and flutter_lints (#452, #434, #414, #419).
  • Package link updates & style resource relocation (MaplibreStyles moved to main package) (#435, #413).

Fixed

  • iOS code generation (Offset / Translate / expression arrays) (#481).
  • Annotation tap consumption now properly respected (annotationConsumeTapEvents).
  • Prevent calling notifyListeners() after controller disposal (#621).
  • Web: event listener cancellation & hover handling robustness (#623).
  • Offline region download crash in example (#569).
  • Added style loaded safety checks (#563).
  • Aligned example and web pubspec versions (#476).
  • Web: enforce maplibre-gl-js 4.x & remove shadow root stylesheet workaround (#409).

Refactor / Quality

  • Enable and fix additional lint rules (#452).

New Contributors

Contributors: @AlexanderThiele, @mhernz, @TarekTolba1, @srmncnk, @itheamc, @kuhnroyal, @albertmoravec, @gabbopalma
Full Changelog: v0.22.0...v0.23.0

v0.21.0

26 Feb 15:01
e7adbf9

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.20.0...v0.21.0

v0.20.0

07 Jun 10:45
v0.20.0
cdc68bf

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.19.0+2...v0.20.0

v0.19.0

22 May 20:52
4766e32

Choose a tag to compare

Notes

  • It is no longer required to depend on the GitHub repository, all packages have now been published to pub.dev: https://pub.dev/packages/maplibre_gl
  • Because of some complications with the release cycle, there exist a 0.19.0+1 and 0.19.0+2 tag too.
    However, there are changes to the library between these tags, only a version bump.

What's Changed

  • Bump actions/setup-java from 3 to 4 by @dependabot in #345
  • Add docs for setCameraBounds by @m0nac0 in #351
  • Add iOS long click duration parameter by @m0nac0 in #348
  • supporting fill-extrusion by @krupupakku in #211
  • Bump actions/upload-artifact from 3 to 4 by @dependabot in #361
  • make feature tap detection work for features with a null id on ios (same as android) by @lunaticcoding in #357
  • Readme: add documentation about referencing assets (mbtiles/sprites etc.) by @m0nac0 in #346
  • Update pub.dev workflow for platform_interface by @m0nac0 in #354
  • Fix docs for querySourceFeatures by @m0nac0 in #347
  • feat: heatmap layer by @shenlong-tanwen in #365
  • Bump actions/dependency-review-action from 3 to 4 by @dependabot in #373
  • Add null check to layer#setVisibility on Android by @polylina in #374
  • fix flicker effect on web, when style is loaded slowly by @stefanschaller in #377
  • fix: add tracking mode conversion in onCameraTrackingChanged by @XanderD99 in #376
  • Bump subosito/flutter-action from 2.12.0 to 2.13.0 by @dependabot in #386
  • chore: use major version tag for subosito/flutter-action by @josxha in #404
  • chore: add issue templates by @josxha in #402
  • chore: fix linked Q&A page in GitHub issues by @josxha in #408
  • feat(web): allow package:js version 0.6.x and 0.7.x by @josxha in #410
  • Support newer Gradle versions by @Fabi755 in #390
  • chore: delete pubspec.lock files by @josxha in #412
  • feat: update package links in pubspec.yaml files by @josxha in #413
  • fix(web): ensure the usage of maplibre-gl-js version 4.x.x, remove _addStylesheetToShadowRoot by @josxha in #409
  • feat: add flutter_lints, fix or ignore lints by @josxha in #414
  • feat: allow latest flutter_lints version by @josxha in #419
  • Prepare project for publishing by @kuhnroyal in #411
  • chore: update documentation by @josxha in #422
  • chore: fix publish ci, update .gitignore by @josxha in #424

New Contributors

Full Changelog: 0.18.0...v0.19.0

0.18.0

28 Nov 09:17

Choose a tag to compare

What's Changed

Breaking Change:

Already since 0.17.0, developers do not need to adapt their Podfile for iOS apps anymore as it was previously described in the Readme. Developers who previously added these lines should remove them, since not removing these lines may cause a build failure on iOS. (This change actually already landed in 0.17.0, but it may not have been sufficiently clear that not removing these lines might break builds).

Other Changes:

  • new feature: set arbitrary layer properties by @m0nac0 in #303
  • Update release process by @m0nac0 in #315
  • Add workflows for automated publishing to pub.dev by @m0nac0 in #328
  • Fix example app pubspec by @m0nac0 in #329
  • Updated location plugin version for example app by @varunlohade in #334
  • Housekeeping: Improve docs and update outdated references to point to MapLibre by @m0nac0 in #330

New Contributors

Full Changelog: 0.17.0...0.18.0

0.17.0

10 Nov 12:43

Choose a tag to compare

Note: this list only contains a subset of all contributions, notably excluding those that e.g. only affect the GitHub Actions CI or documentation. See the link at the end for a full changelog.

Repository transfer: The project repository was transferred to the MapLibre GitHub organization. More information at #221

Breaking Changes:

  • maplibre_gl/mapbox_gl.dart was renamed to maplibre_gl/maplibre_gl.dart. You can do a replace-all from import 'package:maplibre_gl/mapbox_gl.dart'; to import 'package:maplibre_gl/maplibre_gl.dart';
  • useDelayedDisposal was removed since its now fixed in #259
  • useHybridCompositionOverride was removed since it was added in the following fix: #203 and we reverted the fix and used another approach to fix the actual issue.
  • The default for myLocationRenderMode was changed from COMPASS to NORMAL in #244, since the previous default value of COMPASS implicitly enables displaying the location on iOS, which could crash apps that didn't want to display the device location. If you want to continue to use MyLocationRenderMode.COMPASS, please explicitly specify it in the constructor like this:
MaplibreMap(
 myLocationRenderMode: MyLocationRenderMode.COMPASS,
 ...
)
  • The old api registerWith was removed from the MapboxMapsPlugin.java, since there is no need for that.
  • The minSdkVersion was bumped to at least 21 now, since the native android sdk constraint expect that.
  • Changed the minimum Dart version from sdk: 2.12.0 to 2.14.0 in maplibre_gl_platform_interface/pubspec.yaml.

Further changes

New Contributors

Full Changelog: 0.16.0...0.17.0

0.16.0

28 Jun 09:51

Choose a tag to compare

What's Changed

  • cherry-picked all commits from upstream up to flutter-mapbox-gl/maps@3496907, including up to release 0.16.0 from upstream
  • updated Maplibre GL JS for web

New Contributors

Full Changelog: 0.15.0...0.16.0

0.15.1

24 May 10:45

Choose a tag to compare

What's Changed

  • Replace style string in local style example by @m0nac0 in #33
  • [web] add getSymbolLatLng and getLineLatLngs by @m0nac0 in #37
  • Cherry-pick iOS support for colors with alpha by @m0nac0 in #41
  • Cherry-pick: Fix respecting annotationConsumeTapEvents on iOS by @m0nac0 in #42
  • New workflow: generate docs on push by @m0nac0 in #43
  • Add documentation for setMapLanguage by @m0nac0 in #49
  • Cherry-pick: fixed crashes with ios offline manager (upstream#724) by @m0nac0 in #45
  • Cherry-pick: setAttributionMargin to use left margin (upstream#714) by @m0nac0 in #46
  • Cherry-pick: Enable onMapIdle callback for android (upstream#729) by @m0nac0 in #47
  • Cherry-pick Fixes for onStyleLoaded (upstream#690) by @m0nac0 in #48
  • Cherry-pick: Add attribution button gravity, position normally (upstream#731) by @m0nac0 in #50
  • Bump actions/cache from 2.1.6 to 2.1.7 by @dependabot in #51
  • Bump subosito/flutter-action from 1 to 2.2.0 by @dependabot in #56
  • Bump subosito/flutter-action from 2.2.0 to 2.2.1 by @dependabot in #57
  • Bump subosito/flutter-action from 2.2.1 to 2.4.0 by @dependabot in #68
  • Bump actions/setup-java from 2 to 3 by @dependabot in #67
  • Bump actions/upload-artifact from 2 to 3 by @dependabot in #66
  • Bump actions/cache from 2.1.7 to 3.0.2 by @dependabot in #65
  • Bump actions/checkout from 2 to 3 by @dependabot in #61
  • Cherry-pick upstream#710 and upstream#852 by @m0nac0 in #69
  • Cherry-pick upstream#723 (Add support for (geojson) layers) by @m0nac0 in #70
  • Cherry-pick upstream#748 (fixed issue with annotation click order) by @m0nac0 in #71
  • Cherry-pick upstream#706 (Fixing memory leaks) by @m0nac0 in #72
  • Cherry-pick upstream#765 (fixed layer based feature selection) by @m0nac0 in #73
  • Fix issue preventing app launch on Android by @m0nac0 in #74
  • Cherry-pick upstream#778 by @m0nac0 in #75
  • Cherry-pick upstream#782 ([Android] Invoke onPause method of MapView in onPause lifecycle) by @m0nac0 in #76
  • Cherry-pick upstream#766 by @m0nac0 in #77
  • Cherry-pick upstream#767 ([android] speed property is null when onUserLocationUpdated is called) by @m0nac0 in #78
  • Cherry-pick upstream#775 (ios onstyleready reliability) by @m0nac0 in #79
  • Cherry-pick upstream#776 (Handle line color and geometry) by @m0nac0 in #80
  • Cherry-pick upstream#787 (fixed more issues with on style loaded not being called by @m0nac0 in #82
  • Cherry-pick upstream#789 (updated settings gradle to new version) by @m0nac0 in #83
  • Cherry-pick upstream#791 by @m0nac0 in #84
  • cherry-pick upstream#785 (flutter-mapbox-gl/maps#785) by @m0nac0 in #81
  • Cherry-pick upstream#798 (Pass click details to feature tapped) by @m0nac0 in #85
  • Cherry-pick upstream#803 (CI: add check for Dart formatting) by @m0nac0 in #86
  • Cherry-pick upstream#804 by @m0nac0 in #89
  • Cherry-pick upstream#808 by @m0nac0 in #88
  • Cherry-pick upstream#812 ( handle camera target bounds on android) by @m0nac0 in #90
  • Cherry-pick upstream#815 (fixed android crash on style switch) by @m0nac0 in #92
  • Cherry-pick upstream#820 (HOTFIX Add option to not use annotations - android performance) by @m0nac0 in #93
  • cherry-pick upstream#825 by @m0nac0 in #97
  • cherry-pick upstream#847 by @m0nac0 in #99
  • cherry-pick upstream#835 by @m0nac0 in #98
  • cherry-pick upstream#797 (full source support) by @m0nac0 in #100
  • example: add custom marker icon by @m0nac0 in #95
  • iOS: update MapLibre dependency by @m0nac0 in #94
  • hide logo on Android/iOS to match web by @m0nac0 in #101
  • cherry-pick upstream#851 (gesture fixes) by @m0nac0 in #102
  • cherry-pick upstream#854 by @m0nac0 in #103

Full Changelog: 0.15.0...0.15.1