Merge pull request #8176 from vector-im/dependabot/gradle/org.maplibre.gl-android-sdk-10.0.2

Bump org.maplibre.gl:android-sdk from 9.6.0 to 10.0.2
This commit is contained in:
Benoit Marty 2023-03-03 11:17:17 +01:00 committed by GitHub
commit 4f64b20bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View File

@ -134,7 +134,7 @@ ext.libs = [
'mavericksTesting' : "com.airbnb.android:mavericks-testing:$mavericks" 'mavericksTesting' : "com.airbnb.android:mavericks-testing:$mavericks"
], ],
maplibre : [ 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" 'pluginAnnotation' : "org.maplibre.gl:android-plugin-annotation-v9:1.0.0"
], ],
mockk : [ mockk : [

View File

@ -17,6 +17,7 @@
package im.vector.app.features.location package im.vector.app.features.location
import com.mapbox.mapboxsdk.camera.CameraPosition import com.mapbox.mapboxsdk.camera.CameraPosition
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory
import com.mapbox.mapboxsdk.constants.MapboxConstants import com.mapbox.mapboxsdk.constants.MapboxConstants
import com.mapbox.mapboxsdk.geometry.LatLng import com.mapbox.mapboxsdk.geometry.LatLng
import com.mapbox.mapboxsdk.geometry.LatLngBounds import com.mapbox.mapboxsdk.geometry.LatLngBounds
@ -28,12 +29,12 @@ fun MapboxMap?.zoomToLocation(locationData: LocationData, preserveCurrentZoomLev
} else { } else {
INITIAL_MAP_ZOOM_IN_PREVIEW INITIAL_MAP_ZOOM_IN_PREVIEW
} }
this?.easeCamera { val expectedCameraPosition = CameraPosition.Builder()
CameraPosition.Builder() .target(LatLng(locationData.latitude, locationData.longitude))
.target(LatLng(locationData.latitude, locationData.longitude)) .zoom(zoomLevel)
.zoom(zoomLevel) .build()
.build() val cameraUpdate = CameraUpdateFactory.newCameraPosition(expectedCameraPosition)
} this?.easeCamera(cameraUpdate)
} }
fun MapboxMap?.zoomToBounds(latLngBounds: LatLngBounds) { fun MapboxMap?.zoomToBounds(latLngBounds: LatLngBounds) {

View File

@ -12,7 +12,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:mapbox_renderTextureMode="true" app:maplibre_renderTextureMode="true"
app:showLocateButton="true" /> app:showLocateButton="true" />
<im.vector.app.features.location.MapLoadingErrorView <im.vector.app.features.location.MapLoadingErrorView

View File

@ -13,7 +13,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:mapbox_renderTextureMode="true" app:maplibre_renderTextureMode="true"
app:showLocateButton="true" app:showLocateButton="true"
tools:background="#4F00" /> tools:background="#4F00" />