From 088c2ae44953a2f33f2a1eab4ed1f3f50d475cce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Feb 2023 00:00:01 +0000 Subject: [PATCH 1/2] Bump org.maplibre.gl:android-sdk from 9.6.0 to 10.0.2 Bumps [org.maplibre.gl:android-sdk](https://github.com/maplibre/maplibre-gl-native) from 9.6.0 to 10.0.2. - [Release notes](https://github.com/maplibre/maplibre-gl-native/releases) - [Changelog](https://github.com/maplibre/maplibre-gl-native/blob/main/CHANGELOG.md) - [Commits](https://github.com/maplibre/maplibre-gl-native/compare/android-v9.6.0...android-v10.0.2) --- updated-dependencies: - dependency-name: org.maplibre.gl:android-sdk dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index 67bb90eb43..6a00f9a28a 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -134,7 +134,7 @@ ext.libs = [ 'mavericksTesting' : "com.airbnb.android:mavericks-testing:$mavericks" ], maplibre : [ - 'androidSdk' : "org.maplibre.gl:android-sdk:9.6.0", + 'androidSdk' : "org.maplibre.gl:android-sdk:10.0.2", 'pluginAnnotation' : "org.maplibre.gl:android-plugin-annotation-v9:1.0.0" ], mockk : [ From 182aa2a9ca2c2085ccb7d61b820dcb6b193b1fa0 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 2 Mar 2023 12:30:44 +0100 Subject: [PATCH 2/2] Fix API break. --- .../im/vector/app/features/location/MapBoxMapExt.kt | 13 +++++++------ .../main/res/layout/fragment_location_preview.xml | 2 +- .../main/res/layout/fragment_location_sharing.xml | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/location/MapBoxMapExt.kt b/vector/src/main/java/im/vector/app/features/location/MapBoxMapExt.kt index 8e917c665a..5a6e69b103 100644 --- a/vector/src/main/java/im/vector/app/features/location/MapBoxMapExt.kt +++ b/vector/src/main/java/im/vector/app/features/location/MapBoxMapExt.kt @@ -17,6 +17,7 @@ package im.vector.app.features.location import com.mapbox.mapboxsdk.camera.CameraPosition +import com.mapbox.mapboxsdk.camera.CameraUpdateFactory import com.mapbox.mapboxsdk.constants.MapboxConstants import com.mapbox.mapboxsdk.geometry.LatLng import com.mapbox.mapboxsdk.geometry.LatLngBounds @@ -28,12 +29,12 @@ fun MapboxMap?.zoomToLocation(locationData: LocationData, preserveCurrentZoomLev } else { INITIAL_MAP_ZOOM_IN_PREVIEW } - this?.easeCamera { - CameraPosition.Builder() - .target(LatLng(locationData.latitude, locationData.longitude)) - .zoom(zoomLevel) - .build() - } + val expectedCameraPosition = CameraPosition.Builder() + .target(LatLng(locationData.latitude, locationData.longitude)) + .zoom(zoomLevel) + .build() + val cameraUpdate = CameraUpdateFactory.newCameraPosition(expectedCameraPosition) + this?.easeCamera(cameraUpdate) } fun MapboxMap?.zoomToBounds(latLngBounds: LatLngBounds) { diff --git a/vector/src/main/res/layout/fragment_location_preview.xml b/vector/src/main/res/layout/fragment_location_preview.xml index e70baa1581..6addcc9c73 100644 --- a/vector/src/main/res/layout/fragment_location_preview.xml +++ b/vector/src/main/res/layout/fragment_location_preview.xml @@ -12,7 +12,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:mapbox_renderTextureMode="true" + app:maplibre_renderTextureMode="true" app:showLocateButton="true" />