diff --git a/android/core/proguard-rules.pro b/android/core/proguard-rules.pro index 481bb434..a431dfa7 100644 --- a/android/core/proguard-rules.pro +++ b/android/core/proguard-rules.pro @@ -18,4 +18,13 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +# Ferrostar & JNA +# TODO: This needs validation from a publishing app. Ticket https://github.com/stadiamaps/ferrostar/issues/185 +-keep class com.sun.jna.** { *; } +-keep class uniffi.ferrostar.** { *; } +-dontwarn java.awt.Component +-dontwarn java.awt.GraphicsEnvironment +-dontwarn java.awt.HeadlessException +-dontwarn java.awt.Window \ No newline at end of file diff --git a/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/BorderedPolyline.kt b/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/BorderedPolyline.kt index 70af9308..537dce23 100644 --- a/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/BorderedPolyline.kt +++ b/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/BorderedPolyline.kt @@ -10,8 +10,8 @@ fun BorderedPolyline( zIndex: Int = 1, color: String = "#3583dd", borderColor: String = "#ffffff", - lineWidth: Float = 6f, - borderWidth: Float = 2f, + lineWidth: Float = 10f, + borderWidth: Float = 3f ) { Polyline( points = points, diff --git a/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/NavigationMapView.kt b/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/NavigationMapView.kt index 79b2bae9..f3aba7c8 100644 --- a/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/NavigationMapView.kt +++ b/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/NavigationMapView.kt @@ -19,7 +19,7 @@ import com.maplibre.compose.settings.MapControls import com.stadiamaps.ferrostar.core.NavigationUiState import com.stadiamaps.ferrostar.core.NavigationViewModel import com.stadiamaps.ferrostar.core.toAndroidLocation -import com.stadiamaps.ferrostar.maplibreui.extensions.NavigationCentered +import com.stadiamaps.ferrostar.maplibreui.extensions.AutomotiveNavigationCentered import com.stadiamaps.ferrostar.maplibreui.extensions.NavigationDefault /** @@ -42,7 +42,9 @@ fun NavigationMapView( viewModel: NavigationViewModel, locationRequestProperties: LocationRequestProperties = LocationRequestProperties.NavigationDefault(), - onMapReadyCallback: (Style) -> Unit = { camera.value = MapViewCamera.NavigationCentered() }, + onMapReadyCallback: (Style) -> Unit = { + camera.value = MapViewCamera.AutomotiveNavigationCentered() + }, content: @Composable @MapLibreComposable() ((State) -> Unit)? = null ) { val uiState = viewModel.uiState.collectAsState() diff --git a/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/extensions/MapViewCamera.kt b/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/extensions/MapViewCamera.kt index 6e69a206..b19a3c9c 100644 --- a/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/extensions/MapViewCamera.kt +++ b/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/extensions/MapViewCamera.kt @@ -3,11 +3,13 @@ package com.stadiamaps.ferrostar.maplibreui.extensions import com.maplibre.compose.camera.MapViewCamera /** - * The centered camera configuration for navigation. This configuration sets the camera to track the - * user, with a bearing of 18 degrees and a pitch of 45 degrees. + * The centered camera configuration for automotive navigation. + * + * This configuration sets the camera to track the user, with a zoom of 16 degrees and a pitch of 45 + * degrees. * * @return The navigation MapViewCamera */ -fun MapViewCamera.Companion.NavigationCentered(): MapViewCamera { - return MapViewCamera.TrackingUserLocationWithBearing(zoom = 18.0, pitch = 45.0) +fun MapViewCamera.Companion.AutomotiveNavigationCentered(): MapViewCamera { + return MapViewCamera.TrackingUserLocationWithBearing(zoom = 16.0, pitch = 45.0) }