diff --git a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/LiteGoogleMap.kt b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/LiteGoogleMap.kt index 14fa40c607..65d84eb537 100644 --- a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/LiteGoogleMap.kt +++ b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/LiteGoogleMap.kt @@ -210,7 +210,7 @@ class LiteGoogleMapImpl(context: Context, var options: GoogleMapOptions) : Abstr if (savedInstanceState?.containsKey(BUNDLE_CAMERA_POSITION) == true) { cameraPosition = savedInstanceState.getParcelable(BUNDLE_CAMERA_POSITION)!! - cameraBounds = savedInstanceState.getParcelable(BUNDLE_CAMERA_BOUNDS) + cameraBounds = (savedInstanceState.getParcelable(BUNDLE_CAMERA_BOUNDS) as LatLngBounds?)?.toMapbox() } postUpdateSnapshot() @@ -616,7 +616,7 @@ class LiteGoogleMapImpl(context: Context, var options: GoogleMapOptions) : Abstr override fun onSaveInstanceState(outState: Bundle) { outState.putParcelable(BUNDLE_CAMERA_POSITION, cameraPosition) - outState.putParcelable(BUNDLE_CAMERA_BOUNDS, cameraBounds) + outState.putParcelable(BUNDLE_CAMERA_BOUNDS, cameraBounds?.toGms()) } override fun setContentDescription(desc: String?) {