Skip to content

Commit

Permalink
1462: update maplibre, fix properties
Browse files Browse the repository at this point in the history
  • Loading branch information
f1sh1918 committed Jun 13, 2024
1 parent 3780f9b commit c5da615
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 27 deletions.
10 changes: 5 additions & 5 deletions frontend/lib/map/map/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ class _MapContainerState extends State<MapContainer> implements MapController {
// There is no way to remove the logo, so set the margins to a really large value to hide it
logoViewMargins: const math.Point(double.maxFinite, double.maxFinite),
myLocationEnabled: _permissionGiven,
myLocationTrackingMode: _permissionGiven ? MyLocationTrackingMode.Tracking : MyLocationTrackingMode.None,
myLocationTrackingMode: _permissionGiven ? MyLocationTrackingMode.tracking : MyLocationTrackingMode.none,
// required to prevent mapbox iOS from requesting location
// permissions on startup, as discussed in #249
myLocationRenderMode: MyLocationRenderMode.NORMAL,
myLocationRenderMode: MyLocationRenderMode.normal,
onMapCreated: _onMapCreated,
onMapClick: _onMapClick,
onStyleLoadedCallback: () {},
compassViewMargins: math.Point(Platform.isIOS ? compassMargin : 0, compassMargin),
compassViewPosition: CompassViewPosition.TopRight,
compassViewPosition: CompassViewPosition.topRight,
minMaxZoomPreference: const MinMaxZoomPreference(4.0, 18.0),
),
Positioned(
Expand Down Expand Up @@ -229,7 +229,7 @@ class _MapContainerState extends State<MapContainer> implements MapController {

final update =
zoomLevel != null ? CameraUpdate.newLatLngZoom(location, zoomLevel) : CameraUpdate.newLatLng(location);
await controller.updateMyLocationTrackingMode(MyLocationTrackingMode.None);
await controller.updateMyLocationTrackingMode(MyLocationTrackingMode.none);
await controller.animateCamera(update);
}

Expand All @@ -250,7 +250,7 @@ class _MapContainerState extends State<MapContainer> implements MapController {
);
await controller.animateCamera(cameraUpdate);

await controller.updateMyLocationTrackingMode(MyLocationTrackingMode.Tracking);
await controller.updateMyLocationTrackingMode(MyLocationTrackingMode.tracking);
if (!_permissionGiven) {
setState(() => _permissionGiven = true);
}
Expand Down
33 changes: 15 additions & 18 deletions frontend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -734,30 +734,27 @@ packages:
maplibre_gl:
dependency: "direct main"
description:
path: "."
ref: "git-release-0.18.0"
resolved-ref: "9397fae65c533e8ff0828bf62511ca34082763ff"
url: "https://github.com/maplibre/flutter-maplibre-gl.git"
source: git
version: "0.18.0"
name: maplibre_gl
sha256: ea2fa443e7d5dc18db7f37a0f6f5af40642888c56b81a14441aeddea077adaea
url: "https://pub.dev"
source: hosted
version: "0.20.0"
maplibre_gl_platform_interface:
dependency: transitive
description:
path: maplibre_gl_platform_interface
ref: "git-release-0.18.0"
resolved-ref: "9397fae65c533e8ff0828bf62511ca34082763ff"
url: "https://github.com/maplibre/flutter-maplibre-gl.git"
source: git
version: "0.18.0"
name: maplibre_gl_platform_interface
sha256: "718c3503f36936fbf35c34d6ddf8bf770474c5ba1e6cb1d8caece44efae424af"
url: "https://pub.dev"
source: hosted
version: "0.20.0"
maplibre_gl_web:
dependency: transitive
description:
path: maplibre_gl_web
ref: "git-release-0.18.0"
resolved-ref: "9397fae65c533e8ff0828bf62511ca34082763ff"
url: "https://github.com/maplibre/flutter-maplibre-gl.git"
source: git
version: "0.18.0"
name: maplibre_gl_web
sha256: e7d71b08f24dca70e9c9cf841b096704a677e6239447d87220ec071355768149
url: "https://pub.dev"
source: hosted
version: "0.20.0"
matcher:
dependency: transitive
description:
Expand Down
5 changes: 1 addition & 4 deletions frontend/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ dependencies:
flutter_localizations:
sdk: flutter
intl: ^0.18.0
maplibre_gl:
git:
url: https://github.com/maplibre/flutter-maplibre-gl.git
ref: git-release-0.18.0
maplibre_gl: ^0.20.0
provider: ^6.0.3
graphql_flutter: ^5.1.2
url_launcher: ^6.2.5
Expand Down

0 comments on commit c5da615

Please sign in to comment.