Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document breaking change from #244 #247

Merged
merged 5 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## upcoming version
JulianBissekkou marked this conversation as resolved.
Show resolved Hide resolved

### 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 @@ -157,7 +157,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