From abea63bc7e3599880e2b2cee2438399a8d0f0545 Mon Sep 17 00:00:00 2001 From: m0nac0 <58807793+m0nac0@users.noreply.github.com> Date: Tue, 24 May 2022 10:38:57 +0200 Subject: [PATCH 1/3] hide logo on iOS/Android to match web --- .../src/main/java/com/mapbox/mapboxgl/MapboxMapBuilder.java | 3 ++- ios/Classes/MapboxMapController.swift | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/mapbox/mapboxgl/MapboxMapBuilder.java b/android/src/main/java/com/mapbox/mapboxgl/MapboxMapBuilder.java index e3f1f04d9..1800c586c 100644 --- a/android/src/main/java/com/mapbox/mapboxgl/MapboxMapBuilder.java +++ b/android/src/main/java/com/mapbox/mapboxgl/MapboxMapBuilder.java @@ -24,7 +24,8 @@ class MapboxMapBuilder implements MapboxMapOptionsSink { public final String TAG = getClass().getSimpleName(); private final MapboxMapOptions options = new MapboxMapOptions() - .attributionEnabled(true); + .attributionEnabled(true) + .logoEnabled(false); private boolean trackCameraPosition = false; private boolean myLocationEnabled = false; private int myLocationTrackingMode = 0; diff --git a/ios/Classes/MapboxMapController.swift b/ios/Classes/MapboxMapController.swift index 99affacee..faa168a01 100644 --- a/ios/Classes/MapboxMapController.swift +++ b/ios/Classes/MapboxMapController.swift @@ -41,6 +41,7 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma ) { mapView = MGLMapView(frame: frame) mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight] + mapView.logoView.isHidden = true self.registrar = registrar super.init() From a2e34e6c892b0a6a76703c17f933f519815f0a54 Mon Sep 17 00:00:00 2001 From: m0nac0 <58807793+m0nac0@users.noreply.github.com> Date: Tue, 24 May 2022 11:36:14 +0200 Subject: [PATCH 2/3] update android maplibre dependency --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index eb98adf9d..539bb3d50 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -39,7 +39,7 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } dependencies { - implementation 'org.maplibre.gl:android-sdk:9.5.1' + implementation 'org.maplibre.gl:android-sdk:9.5.2' implementation 'org.maplibre.gl:android-plugin-annotation-v9:1.0.0' implementation 'org.maplibre.gl:android-plugin-localization-v9:1.0.0' implementation 'org.maplibre.gl:android-plugin-offline-v9:1.0.0' From f370023da58b45c0f9a42e30f57836e34ce296e4 Mon Sep 17 00:00:00 2001 From: m0nac0 <58807793+m0nac0@users.noreply.github.com> Date: Tue, 24 May 2022 11:36:51 +0200 Subject: [PATCH 3/3] make AttributionButtonPosition.BottomRight the default otherwise the attribution would be in a different position on Android than on iOS/web --- lib/src/mapbox_map.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/mapbox_map.dart b/lib/src/mapbox_map.dart index 23448f8b1..90daebbd5 100644 --- a/lib/src/mapbox_map.dart +++ b/lib/src/mapbox_map.dart @@ -30,7 +30,7 @@ class MaplibreMap extends StatefulWidget { this.logoViewMargins, this.compassViewPosition, this.compassViewMargins, - this.attributionButtonPosition, + this.attributionButtonPosition = AttributionButtonPosition.BottomRight, this.attributionButtonMargins, this.onMapClick, this.onUserLocationUpdated,