Skip to content

Commit

Permalink
Document breaking change from maplibre#244 (maplibre#247)
Browse files Browse the repository at this point in the history
depends on maplibre#244

---------

Co-authored-by: Julian Bissekkou <36447137+JulianBissekkou@users.noreply.github.com>
  • Loading branch information
2 people authored and JanikoNaber committed Aug 23, 2023
1 parent 1fbd253 commit 9cfa0af
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## upcoming version

### Breaking Change:
* The default for `myLocationRenderMode` was changed from `COMPASS` to `NORMAL` in https://github.com/maplibre/flutter-maplibre-gl/pull/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:
```dart
MaplibreMap(
myLocationRenderMode: MyLocationRenderMode.COMPASS,
...
)
```

## 0.16.0, Jun 28, 2022
* cherry-picked all commits from upstream up to [https://github.com/flutter-mapbox-gl/maps/commit/3496907955cd4b442e4eb905d67e8d46692174f1), including up to release 0.16.0 from upstream
* updated Maplibre GL JS for web
Expand Down
4 changes: 3 additions & 1 deletion lib/src/mapbox_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ class MaplibreMap extends StatefulWidget {
/// `myLocationEnabled` needs to be true for values other than `MyLocationTrackingMode.None` to work.
final MyLocationTrackingMode myLocationTrackingMode;

/// The mode to render the user location symbol
/// Specifies if and how the user's heading/bearing is rendered in the user location indicator.
/// See the documentation of [MyLocationRenderMode] for details.
/// If this is set to a value other than [MyLocationRenderMode.NORMAL], [myLocationEnabled] needs to be true.
final MyLocationRenderMode myLocationRenderMode;

/// Set the layout margins for the Mapbox Logo
Expand Down
7 changes: 6 additions & 1 deletion maplibre_gl_platform_interface/lib/src/ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ enum MyLocationTrackingMode {
TrackingGPS,
}

/// Render mode
/// Specifies if and how the user's heading/bearing is rendered in the user location indicator.
enum MyLocationRenderMode {
/// Do not show the user's heading/bearing.
NORMAL,

/// Show the user's heading/bearing as determined by the device's compass. On iOS, this causes the user's location to be shown on the map.
COMPASS,

/// Show the user's heading/bearing as determined by the device's GPS sensor. Not supported on iOS.
GPS,
}

Expand Down

0 comments on commit 9cfa0af

Please sign in to comment.