diff --git a/libandroid-navigation-ui/src/main/java/org/maplibre/navigation/android/navigation/ui/v5/notification/MapLibreNavigationNotification.kt b/libandroid-navigation-ui/src/main/java/org/maplibre/navigation/android/navigation/ui/v5/notification/MapLibreNavigationNotification.kt index 4ba4ef392..262518e64 100644 --- a/libandroid-navigation-ui/src/main/java/org/maplibre/navigation/android/navigation/ui/v5/notification/MapLibreNavigationNotification.kt +++ b/libandroid-navigation-ui/src/main/java/org/maplibre/navigation/android/navigation/ui/v5/notification/MapLibreNavigationNotification.kt @@ -22,7 +22,7 @@ import org.maplibre.navigation.android.navigation.ui.v5.utils.LocaleUtils import org.maplibre.navigation.android.navigation.ui.v5.utils.time.TimeFormatter import org.maplibre.navigation.core.models.UnitType import org.maplibre.navigation.core.navigation.MapLibreNavigation -import org.maplibre.navigation.core.utils.ManeuverUtils +import org.maplibre.navigation.android.navigation.ui.v5.utils.ManeuverUtils import java.util.Calendar /** diff --git a/libandroid-navigation-ui/src/main/java/org/maplibre/navigation/android/navigation/ui/v5/utils/ManeuverUtils.kt b/libandroid-navigation-ui/src/main/java/org/maplibre/navigation/android/navigation/ui/v5/utils/ManeuverUtils.kt new file mode 100644 index 000000000..5232a842d --- /dev/null +++ b/libandroid-navigation-ui/src/main/java/org/maplibre/navigation/android/navigation/ui/v5/utils/ManeuverUtils.kt @@ -0,0 +1,160 @@ +package org.maplibre.navigation.android.navigation.ui.v5.utils + +import org.maplibre.navigation.android.navigation.ui.v5.R +import org.maplibre.navigation.core.models.LegStep +import org.maplibre.navigation.core.navigation.NavigationConstants + +open class ManeuverUtils { + + private val maneuverResources = mutableMapOf( + NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_UTURN to R.drawable.ic_maneuver_turn_180, + NavigationConstants.STEP_MANEUVER_TYPE_CONTINUE + NavigationConstants.STEP_MANEUVER_MODIFIER_UTURN to R.drawable.ic_maneuver_turn_180, + NavigationConstants.STEP_MANEUVER_TYPE_CONTINUE + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to R.drawable.ic_maneuver_turn_0, + + NavigationConstants.STEP_MANEUVER_TYPE_ARRIVE + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to R.drawable.ic_maneuver_arrive_left, + NavigationConstants.STEP_MANEUVER_TYPE_ARRIVE + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_arrive_right, + NavigationConstants.STEP_MANEUVER_TYPE_ARRIVE to + R.drawable.ic_maneuver_arrive, + + NavigationConstants.STEP_MANEUVER_TYPE_DEPART + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_depart_left, + NavigationConstants.STEP_MANEUVER_TYPE_DEPART + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_depart_right, + NavigationConstants.STEP_MANEUVER_TYPE_DEPART to + R.drawable.ic_maneuver_depart, + + NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to + R.drawable.ic_maneuver_turn_75, + NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_turn_45, + NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_turn_30, + + NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to + R.drawable.ic_maneuver_turn_75_left, + NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_turn_45_left, + NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_turn_30_left, + + NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_merge_left, + NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_merge_left, + NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_merge_right, + NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_merge_right, + NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to + R.drawable.ic_maneuver_turn_0, + + NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to + R.drawable.ic_maneuver_turn_75_left, + NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_turn_45_left, + NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_turn_30_left, + + NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to + R.drawable.ic_maneuver_turn_75, + NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_turn_45, + NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_turn_30, + + NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_off_ramp_left, + NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_off_ramp_slight_left, + + NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_off_ramp_right, + NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_off_ramp_slight_right, + + NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_fork_left, + NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_fork_slight_left, + NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_fork_right, + NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_fork_slight_right, + NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to + R.drawable.ic_maneuver_fork_straight, + NavigationConstants.STEP_MANEUVER_TYPE_FORK to + R.drawable.ic_maneuver_fork, + + NavigationConstants.STEP_MANEUVER_TYPE_END_OF_ROAD + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_end_of_road_left, + NavigationConstants.STEP_MANEUVER_TYPE_END_OF_ROAD + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_end_of_road_right, + + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_roundabout_left, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to + R.drawable.ic_maneuver_roundabout_sharp_left, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_roundabout_slight_left, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_roundabout_right, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to + R.drawable.ic_maneuver_roundabout_sharp_right, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_roundabout_slight_right, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to + R.drawable.ic_maneuver_roundabout_straight, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT to + R.drawable.ic_maneuver_roundabout, + + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_roundabout_left, + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to + R.drawable.ic_maneuver_roundabout_sharp_left, + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_roundabout_slight_left, + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_roundabout_right, + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to + R.drawable.ic_maneuver_roundabout_sharp_right, + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_roundabout_slight_right, + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to + R.drawable.ic_maneuver_roundabout_straight, + NavigationConstants.STEP_MANEUVER_TYPE_ROTARY to + R.drawable.ic_maneuver_roundabout, + + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_turn_45_left, + NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_turn_45, + + NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to + R.drawable.ic_maneuver_turn_45_left, + NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to + R.drawable.ic_maneuver_turn_75_left, + NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to + R.drawable.ic_maneuver_turn_30_left, + + NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to + R.drawable.ic_maneuver_turn_45, + NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to + R.drawable.ic_maneuver_turn_75, + NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to + R.drawable.ic_maneuver_turn_30, + NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to + R.drawable.ic_maneuver_turn_0, + + NavigationConstants.STEP_MANEUVER_TYPE_NEW_NAME + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to + R.drawable.ic_maneuver_turn_0, + ) + + fun getManeuverResource(step: LegStep): Int { + val maneuver = step.maneuver + + val maneuverKey = listOfNotNull(maneuver.type?.text, maneuver.modifier) + return maneuverResources[maneuverKey.joinToString("")] ?: R.drawable.ic_maneuver_turn_0 + return 0 + } +} diff --git a/libandroid-navigation/build.gradle b/libandroid-navigation/build.gradle index e92de4fe7..405559c8a 100644 --- a/libandroid-navigation/build.gradle +++ b/libandroid-navigation/build.gradle @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.gradle.dsl.JvmTarget - apply plugin: 'org.jetbrains.kotlin.multiplatform' apply plugin: 'com.android.library' apply plugin: 'maven-publish' @@ -25,6 +23,8 @@ kotlin { sourceSets { commonMain.dependencies { + api dependenciesList.mapLibreTurf + implementation dependenciesList.kotlinxSerializationJson implementation dependenciesList.kotlinxCoroutines api dependenciesList.kotlinxDateTime @@ -38,8 +38,7 @@ kotlin { } androidMain.dependencies { - implementation dependenciesList.mapLibre - api dependenciesList.mapLibreTurf +// implementation dependenciesList.mapLibre // Location by Play Services // Will only used, when added by the client app diff --git a/libandroid-navigation/src/commonMain/AndroidManifest.xml b/libandroid-navigation/src/androidMain/AndroidManifest.xml similarity index 82% rename from libandroid-navigation/src/commonMain/AndroidManifest.xml rename to libandroid-navigation/src/androidMain/AndroidManifest.xml index 35ec90d93..5e85bd0b8 100644 --- a/libandroid-navigation/src/commonMain/AndroidManifest.xml +++ b/libandroid-navigation/src/androidMain/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/libandroid-navigation/src/androidUnitTest/kotlin/org/maplibre/navigation/core/utils/ValidationUtilsTest.kt b/libandroid-navigation/src/androidUnitTest/kotlin/org/maplibre/navigation/core/utils/ValidationUtilsTest.kt index 43426d03e..62a714cf7 100644 --- a/libandroid-navigation/src/androidUnitTest/kotlin/org/maplibre/navigation/core/utils/ValidationUtilsTest.kt +++ b/libandroid-navigation/src/androidUnitTest/kotlin/org/maplibre/navigation/core/utils/ValidationUtilsTest.kt @@ -10,7 +10,7 @@ import kotlin.test.Test class ValidationUtilsTest : BaseTest() { - @Test(expected = MissingFormatArgumentException::class) + @Test(expected = IllegalStateException::class) @Throws(Exception::class) fun validDirectionsRoute_isInvalidWithNullRouteOptions() { var route = buildTestDirectionsRoute(DIRECTIONS_WITHOUT_VOICE_INSTRUCTIONS) @@ -20,7 +20,7 @@ class ValidationUtilsTest : BaseTest() { ValidationUtils.validDirectionsRoute(route, true) } - @Test(expected = MissingFormatArgumentException::class) + @Test(expected = IllegalStateException::class) @Throws(Exception::class) fun validDirectionsRoute_isInvalidWithNullInstructions() { val routeWithNullInstructions = buildRouteWithNullInstructions() @@ -28,7 +28,7 @@ class ValidationUtilsTest : BaseTest() { ValidationUtils.validDirectionsRoute(routeWithNullInstructions, true) } - @Test(expected = MissingFormatArgumentException::class) + @Test(expected = IllegalStateException::class) @Throws(Exception::class) fun validDirectionsRoute_isInvalidWithFalseVoiceInstructions() { val routeWithFalseVoiceInstructions = buildRouteWithFalseVoiceInstructions() @@ -36,7 +36,7 @@ class ValidationUtilsTest : BaseTest() { ValidationUtils.validDirectionsRoute(routeWithFalseVoiceInstructions, true) } - @Test(expected = MissingFormatArgumentException::class) + @Test(expected = IllegalStateException::class) @Throws(Exception::class) fun validDirectionsRoute_isInvalidWithFalseBannerInstructions() { val routeWithFalseBannerInstructions = buildRouteWithFalseBannerInstructions() diff --git a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/location/replay/ReplayRouteLocationEngine.kt b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/location/replay/ReplayRouteLocationEngine.kt index 0e246479a..21911e184 100644 --- a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/location/replay/ReplayRouteLocationEngine.kt +++ b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/location/replay/ReplayRouteLocationEngine.kt @@ -7,7 +7,6 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.launch -import org.maplibre.android.location.engine.LocationEngineRequest import org.maplibre.geojson.LineString import org.maplibre.geojson.Point import org.maplibre.navigation.core.location.Location @@ -23,7 +22,6 @@ open class ReplayRouteLocationEngine( private var mockedLocations: MutableList = mutableListOf() private var dispatcher: ReplayLocationDispatcher? = null - @get:SuppressLint("MissingPermission") var lastLocation: Location? = null private set diff --git a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsResponse.kt b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsResponse.kt index 5f318fde8..d39f6d848 100644 --- a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsResponse.kt +++ b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsResponse.kt @@ -3,6 +3,7 @@ package org.maplibre.navigation.core.models import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import org.maplibre.navigation.core.json +import kotlin.jvm.JvmStatic /** * This is the root Mapbox Directions API response. Inside this class are several nested classes diff --git a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsRoute.kt b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsRoute.kt index 0ccaf269a..e50a79f74 100644 --- a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsRoute.kt +++ b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/models/DirectionsRoute.kt @@ -4,6 +4,7 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import org.maplibre.navigation.core.json +import kotlin.jvm.JvmStatic /** * Detailed information about an individual route such as the duration, distance and geometry. diff --git a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/route/FasterRouteDetector.kt b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/route/FasterRouteDetector.kt index 16dec1f9b..8bcd1ff1e 100644 --- a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/route/FasterRouteDetector.kt +++ b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/route/FasterRouteDetector.kt @@ -9,8 +9,6 @@ import org.maplibre.navigation.core.navigation.MapLibreNavigationOptions import org.maplibre.navigation.core.navigation.NavigationConstants import org.maplibre.navigation.core.routeprogress.RouteProgress import org.maplibre.navigation.core.routeprogress.RouteStepProgress -import java.util.Date -import java.util.concurrent.TimeUnit open class FasterRouteDetector( private val navigationOptions: MapLibreNavigationOptions @@ -128,13 +126,7 @@ open class FasterRouteDetector( location.time.epochSeconds - lastCheckedLocation.time.epochSeconds } ?: -1 } - - @Suppress("SameParameterValue") - private fun dateDiff(firstDate: Date, secondDate: Date, timeUnit: TimeUnit): Long { - val diffInMillis = secondDate.time - firstDate.time - return timeUnit.convert(diffInMillis, TimeUnit.MILLISECONDS) - } - + companion object { private const val VALID_ROUTE_DURATION_REMAINING = 600 } diff --git a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/ManeuverUtils.kt b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/ManeuverUtils.kt deleted file mode 100644 index 61bf4c824..000000000 --- a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/ManeuverUtils.kt +++ /dev/null @@ -1,160 +0,0 @@ -package org.maplibre.navigation.core.utils - -import org.maplibre.navigation.core.R -import org.maplibre.navigation.core.models.LegStep -import org.maplibre.navigation.core.navigation.NavigationConstants - -open class ManeuverUtils { - -// private val maneuverResources = mutableMapOf( -// NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_UTURN to R.drawable.ic_maneuver_turn_180, -// NavigationConstants.STEP_MANEUVER_TYPE_CONTINUE + NavigationConstants.STEP_MANEUVER_MODIFIER_UTURN to R.drawable.ic_maneuver_turn_180, -// NavigationConstants.STEP_MANEUVER_TYPE_CONTINUE + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to R.drawable.ic_maneuver_turn_0, -// -// NavigationConstants.STEP_MANEUVER_TYPE_ARRIVE + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to R.drawable.ic_maneuver_arrive_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ARRIVE + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_arrive_right, -// NavigationConstants.STEP_MANEUVER_TYPE_ARRIVE to -// R.drawable.ic_maneuver_arrive, -// -// NavigationConstants.STEP_MANEUVER_TYPE_DEPART + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_depart_left, -// NavigationConstants.STEP_MANEUVER_TYPE_DEPART + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_depart_right, -// NavigationConstants.STEP_MANEUVER_TYPE_DEPART to -// R.drawable.ic_maneuver_depart, -// -// NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to -// R.drawable.ic_maneuver_turn_75, -// NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_turn_45, -// NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_turn_30, -// -// NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to -// R.drawable.ic_maneuver_turn_75_left, -// NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_turn_45_left, -// NavigationConstants.STEP_MANEUVER_TYPE_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_turn_30_left, -// -// NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_merge_left, -// NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_merge_left, -// NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_merge_right, -// NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_merge_right, -// NavigationConstants.STEP_MANEUVER_TYPE_MERGE + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to -// R.drawable.ic_maneuver_turn_0, -// -// NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to -// R.drawable.ic_maneuver_turn_75_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_turn_45_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_turn_30_left, -// -// NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to -// R.drawable.ic_maneuver_turn_75, -// NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_turn_45, -// NavigationConstants.STEP_MANEUVER_TYPE_ON_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_turn_30, -// -// NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_off_ramp_left, -// NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_off_ramp_slight_left, -// -// NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_off_ramp_right, -// NavigationConstants.STEP_MANEUVER_TYPE_OFF_RAMP + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_off_ramp_slight_right, -// -// NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_fork_left, -// NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_fork_slight_left, -// NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_fork_right, -// NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_fork_slight_right, -// NavigationConstants.STEP_MANEUVER_TYPE_FORK + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to -// R.drawable.ic_maneuver_fork_straight, -// NavigationConstants.STEP_MANEUVER_TYPE_FORK to -// R.drawable.ic_maneuver_fork, -// -// NavigationConstants.STEP_MANEUVER_TYPE_END_OF_ROAD + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_end_of_road_left, -// NavigationConstants.STEP_MANEUVER_TYPE_END_OF_ROAD + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_end_of_road_right, -// -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_roundabout_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to -// R.drawable.ic_maneuver_roundabout_sharp_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_roundabout_slight_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_roundabout_right, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to -// R.drawable.ic_maneuver_roundabout_sharp_right, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_roundabout_slight_right, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to -// R.drawable.ic_maneuver_roundabout_straight, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT to -// R.drawable.ic_maneuver_roundabout, -// -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_roundabout_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to -// R.drawable.ic_maneuver_roundabout_sharp_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_roundabout_slight_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_roundabout_right, -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to -// R.drawable.ic_maneuver_roundabout_sharp_right, -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_roundabout_slight_right, -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to -// R.drawable.ic_maneuver_roundabout_straight, -// NavigationConstants.STEP_MANEUVER_TYPE_ROTARY to -// R.drawable.ic_maneuver_roundabout, -// -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_turn_45_left, -// NavigationConstants.STEP_MANEUVER_TYPE_ROUNDABOUT_TURN + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_turn_45, -// -// NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_LEFT to -// R.drawable.ic_maneuver_turn_45_left, -// NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_LEFT to -// R.drawable.ic_maneuver_turn_75_left, -// NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_LEFT to -// R.drawable.ic_maneuver_turn_30_left, -// -// NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_RIGHT to -// R.drawable.ic_maneuver_turn_45, -// NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SHARP_RIGHT to -// R.drawable.ic_maneuver_turn_75, -// NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_SLIGHT_RIGHT to -// R.drawable.ic_maneuver_turn_30, -// NavigationConstants.STEP_MANEUVER_TYPE_NOTIFICATION + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to -// R.drawable.ic_maneuver_turn_0, -// -// NavigationConstants.STEP_MANEUVER_TYPE_NEW_NAME + NavigationConstants.STEP_MANEUVER_MODIFIER_STRAIGHT to -// R.drawable.ic_maneuver_turn_0, -// ) - - fun getManeuverResource(step: LegStep): Int { -// val maneuver = step.maneuver -// -// val maneuverKey = listOfNotNull(maneuver.type?.text, maneuver.modifier) -// return maneuverResources[maneuverKey.joinToString("")] ?: R.drawable.ic_maneuver_turn_0 - return 0 - } -} diff --git a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/MathUtils.kt b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/MathUtils.kt index 3d8257fed..3793bf8ae 100644 --- a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/MathUtils.kt +++ b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/MathUtils.kt @@ -1,8 +1,9 @@ package org.maplibre.navigation.core.utils import kotlin.jvm.JvmStatic -import org.maplibre.android.utils.MathUtils as MapLibreMathUtils import kotlin.math.abs +import kotlin.math.max +import kotlin.math.min object MathUtils { @@ -16,7 +17,7 @@ object MathUtils { */ @JvmStatic fun clamp(value: Double, min: Double, max: Double): Double { - return MapLibreMathUtils.clamp(value, min, max) + return max(min, min(max, value)); } /** @@ -32,7 +33,10 @@ object MathUtils { */ @JvmStatic fun wrap(value: Double, min: Double, max: Double): Double { - return MapLibreMathUtils.wrap(value, min, max) + val delta = max - min + val firstMod = (value - min) % delta + val secondMod = (firstMod + delta) % delta + return secondMod + min } /** diff --git a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/RingBuffer.kt b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/RingBuffer.kt index b8af4db19..1d841a181 100644 --- a/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/RingBuffer.kt +++ b/libandroid-navigation/src/commonMain/kotlin/org/maplibre/navigation/core/utils/RingBuffer.kt @@ -1,43 +1,44 @@ package org.maplibre.navigation.core.utils -import java.util.ArrayDeque -class RingBuffer(private val maxSize: Int) : ArrayDeque() { +class RingBuffer(private val maxSize: Int) { + + private val values = ArrayDeque() init { require(maxSize > 0) { "Max size must be greater than 0." } } - override fun add(element: T): Boolean { - val result = super.add(element) + fun add(element: T): Boolean { + val result = values.add(element) resize() return result } - override fun addFirst(item: T) { - super.addFirst(item) + fun addFirst(item: T) { + values.addFirst(item) resize() } - override fun addLast(item: T) { - super.addLast(item) + fun addLast(item: T) { + values.addLast(item) resize() } - override fun addAll(elements: Collection): Boolean { - val result = super.addAll(elements) + fun addAll(elements: Collection): Boolean { + val result = values.addAll(elements) resize() return result } - override fun push(item: T) { - super.push(item) + fun push(item: T) { + values.addFirst(item) resize() } private fun resize() { - while (size > maxSize) { - pop() + while (values.size > maxSize) { + values.removeFirst() } } } \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_confusing_directions.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_confusing_directions.png deleted file mode 100644 index 7b1457ba7..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_confusing_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_map_error.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_map_error.png deleted file mode 100644 index c0d1b0405..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_map_error.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_no_turn_allowed.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_no_turn_allowed.png deleted file mode 100644 index b59aba679..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_no_turn_allowed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_road_closed.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_road_closed.png deleted file mode 100644 index ce7b2ced0..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_road_closed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_traffic.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_traffic.png deleted file mode 100644 index f9b231281..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_traffic.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_wrong_directions.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_wrong_directions.png deleted file mode 100644 index 4d86c19e6..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/ic_wrong_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/map_marker_dark.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/map_marker_dark.png deleted file mode 100644 index bf7aa4d79..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/map_marker_dark.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-hdpi/map_marker_light.png b/libandroid-navigation/src/commonMain/res/drawable-hdpi/map_marker_light.png deleted file mode 100644 index ce839ff6c..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-hdpi/map_marker_light.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-land/turn_lane_background.xml b/libandroid-navigation/src/commonMain/res/drawable-land/turn_lane_background.xml deleted file mode 100644 index 54b7a4088..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-land/turn_lane_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_confusing_directions.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_confusing_directions.png deleted file mode 100644 index 9a6c63cb8..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_confusing_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_map_error.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_map_error.png deleted file mode 100644 index 4fce23d80..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_map_error.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_no_turn_allowed.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_no_turn_allowed.png deleted file mode 100644 index f6bd1f17a..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_no_turn_allowed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_road_closed.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_road_closed.png deleted file mode 100644 index 4417d7bdc..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_road_closed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_traffic.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_traffic.png deleted file mode 100644 index 861c4259f..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_traffic.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_wrong_directions.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_wrong_directions.png deleted file mode 100644 index a0345235e..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/ic_wrong_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/map_marker_dark.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/map_marker_dark.png deleted file mode 100644 index 5f7e8213d..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/map_marker_dark.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-mdpi/map_marker_light.png b/libandroid-navigation/src/commonMain/res/drawable-mdpi/map_marker_light.png deleted file mode 100644 index c7ea385fe..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-mdpi/map_marker_light.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-v21/alert_progress_drawable.xml b/libandroid-navigation/src/commonMain/res/drawable-v21/alert_progress_drawable.xml deleted file mode 100644 index ac0f7bd02..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-v21/alert_progress_drawable.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-v21/feedback_bottomsheet_background.xml b/libandroid-navigation/src/commonMain/res/drawable-v21/feedback_bottomsheet_background.xml deleted file mode 100644 index 73fa8a545..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-v21/feedback_bottomsheet_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-v21/feedback_progress_drawable.xml b/libandroid-navigation/src/commonMain/res/drawable-v21/feedback_progress_drawable.xml deleted file mode 100644 index 840490299..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-v21/feedback_progress_drawable.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-v21/instruction_background.xml b/libandroid-navigation/src/commonMain/res/drawable-v21/instruction_background.xml deleted file mode 100644 index 15f313504..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-v21/instruction_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-v21/sound_chip_background.xml b/libandroid-navigation/src/commonMain/res/drawable-v21/sound_chip_background.xml deleted file mode 100644 index e85b10e20..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-v21/sound_chip_background.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-v21/sub_banner_background.xml b/libandroid-navigation/src/commonMain/res/drawable-v21/sub_banner_background.xml deleted file mode 100644 index e25705ee2..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-v21/sub_banner_background.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-v21/wayname_text_background.xml b/libandroid-navigation/src/commonMain/res/drawable-v21/wayname_text_background.xml deleted file mode 100644 index 2c2792747..000000000 --- a/libandroid-navigation/src/commonMain/res/drawable-v21/wayname_text_background.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_confusing_directions.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_confusing_directions.png deleted file mode 100644 index 0a832d6fd..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_confusing_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_map_error.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_map_error.png deleted file mode 100644 index eff4e20ce..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_map_error.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_no_turn_allowed.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_no_turn_allowed.png deleted file mode 100644 index 76070bd65..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_no_turn_allowed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_road_closed.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_road_closed.png deleted file mode 100644 index 2b6f8225b..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_road_closed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_traffic.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_traffic.png deleted file mode 100644 index 4ef40c69d..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_traffic.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_wrong_directions.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_wrong_directions.png deleted file mode 100644 index ba0c22322..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/ic_wrong_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/map_marker_dark.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/map_marker_dark.png deleted file mode 100644 index 874e78fc1..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/map_marker_dark.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/map_marker_light.png b/libandroid-navigation/src/commonMain/res/drawable-xhdpi/map_marker_light.png deleted file mode 100644 index 1d13690cc..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xhdpi/map_marker_light.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_confusing_directions.png b/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_confusing_directions.png deleted file mode 100644 index 5be87d4e9..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_confusing_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_map_error.png b/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_map_error.png deleted file mode 100644 index b030b2c35..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_map_error.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_no_turn_allowed.png b/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_no_turn_allowed.png deleted file mode 100644 index 52db0676c..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_no_turn_allowed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_road_closed.png b/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_road_closed.png deleted file mode 100644 index 531e28eec..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_road_closed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_traffic.png b/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_traffic.png deleted file mode 100644 index 7759f6cf8..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_traffic.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_wrong_directions.png b/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_wrong_directions.png deleted file mode 100644 index 11c06212e..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/ic_wrong_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/map_marker_dark.png b/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/map_marker_dark.png deleted file mode 100644 index fe27873be..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxhdpi/map_marker_dark.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_confusing_directions.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_confusing_directions.png deleted file mode 100644 index c2cec45b7..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_confusing_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_map_error.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_map_error.png deleted file mode 100644 index 2b8b734ab..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_map_error.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_no_turn_allowed.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_no_turn_allowed.png deleted file mode 100644 index ec9809144..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_no_turn_allowed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_road_closed.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_road_closed.png deleted file mode 100644 index 0da165293..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_road_closed.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_traffic.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_traffic.png deleted file mode 100644 index e67d9ff9f..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_traffic.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_wrong_directions.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_wrong_directions.png deleted file mode 100644 index 0cbb1fbb9..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/ic_wrong_directions.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/map_marker_dark.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/map_marker_dark.png deleted file mode 100644 index e76dd343f..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/map_marker_dark.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/map_marker_light.png b/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/map_marker_light.png deleted file mode 100644 index 145af36dd..000000000 Binary files a/libandroid-navigation/src/commonMain/res/drawable-xxxhdpi/map_marker_light.png and /dev/null differ diff --git a/libandroid-navigation/src/commonMain/res/values-bg/strings.xml b/libandroid-navigation/src/commonMain/res/values-bg/strings.xml deleted file mode 100644 index b1fa59dd5..000000000 --- a/libandroid-navigation/src/commonMain/res/values-bg/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Крайна навигация - diff --git a/libandroid-navigation/src/commonMain/res/values-bn/strings.xml b/libandroid-navigation/src/commonMain/res/values-bn/strings.xml deleted file mode 100644 index d7b79c943..000000000 --- a/libandroid-navigation/src/commonMain/res/values-bn/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - ন্যাভিগেশন শেষ - ন্যাভিগেশন প্রজ্ঞাপন - পৌঁছাতে %s - diff --git a/libandroid-navigation/src/commonMain/res/values-ca/strings.xml b/libandroid-navigation/src/commonMain/res/values-ca/strings.xml deleted file mode 100644 index b18c26bb4..000000000 --- a/libandroid-navigation/src/commonMain/res/values-ca/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Aturar navegació - diff --git a/libandroid-navigation/src/commonMain/res/values-cs/strings.xml b/libandroid-navigation/src/commonMain/res/values-cs/strings.xml deleted file mode 100644 index 2a05aacf4..000000000 --- a/libandroid-navigation/src/commonMain/res/values-cs/strings.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - Ukončit navigaci - Navigační upozornění - Příjezd v %s - km - m - míle - stopy - %s Předpokládaný čas příjezdu - - - - den - dni - dnů - den - - - hod. - - min. - diff --git a/libandroid-navigation/src/commonMain/res/values-da/strings.xml b/libandroid-navigation/src/commonMain/res/values-da/strings.xml deleted file mode 100644 index 1e84cc039..000000000 --- a/libandroid-navigation/src/commonMain/res/values-da/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Slut navigation - Navigation Notifikation - Ankomst om %s - diff --git a/libandroid-navigation/src/commonMain/res/values-de/strings.xml b/libandroid-navigation/src/commonMain/res/values-de/strings.xml deleted file mode 100644 index 98c6ff5ab..000000000 --- a/libandroid-navigation/src/commonMain/res/values-de/strings.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - Navigation beenden - Navigationsbenachrichtigungen - Ankunft um %s - km - m - mile - Fuß - %s ETA - - - - Tag - Tage - - - Std. - - Min. - diff --git a/libandroid-navigation/src/commonMain/res/values-es/strings.xml b/libandroid-navigation/src/commonMain/res/values-es/strings.xml deleted file mode 100644 index c66395c56..000000000 --- a/libandroid-navigation/src/commonMain/res/values-es/strings.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - Finaliza navegación - Notificaciones de navegación - Llegando en %s - km - m - mi - pie - - - día - días - - - h - - min - diff --git a/libandroid-navigation/src/commonMain/res/values-fr/strings.xml b/libandroid-navigation/src/commonMain/res/values-fr/strings.xml deleted file mode 100644 index 79663e23e..000000000 --- a/libandroid-navigation/src/commonMain/res/values-fr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Fin de navigation - Notifications de navigation - Arrivée à %s - km - m - mi - ft - - h - - min - diff --git a/libandroid-navigation/src/commonMain/res/values-he/strings.xml b/libandroid-navigation/src/commonMain/res/values-he/strings.xml deleted file mode 100644 index f2b8d3b46..000000000 --- a/libandroid-navigation/src/commonMain/res/values-he/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - סיום ניווט - הודעות ניווט - הגעה ב%s - diff --git a/libandroid-navigation/src/commonMain/res/values-hu/strings.xml b/libandroid-navigation/src/commonMain/res/values-hu/strings.xml deleted file mode 100644 index 608027ac6..000000000 --- a/libandroid-navigation/src/commonMain/res/values-hu/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Navigáció vége - Navigációs értesítések - Érkezés: %s - diff --git a/libandroid-navigation/src/commonMain/res/values-id/strings.xml b/libandroid-navigation/src/commonMain/res/values-id/strings.xml deleted file mode 100644 index c18527c65..000000000 --- a/libandroid-navigation/src/commonMain/res/values-id/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Akhir Navigasi - diff --git a/libandroid-navigation/src/commonMain/res/values-it/strings.xml b/libandroid-navigation/src/commonMain/res/values-it/strings.xml deleted file mode 100644 index f7f82975c..000000000 --- a/libandroid-navigation/src/commonMain/res/values-it/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Termina Navigazione - diff --git a/libandroid-navigation/src/commonMain/res/values-ko/strings.xml b/libandroid-navigation/src/commonMain/res/values-ko/strings.xml deleted file mode 100644 index 599389efe..000000000 --- a/libandroid-navigation/src/commonMain/res/values-ko/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - 네비게이션 종료 - 네비게이션 알림 - %s 에 도착 - km - m - mi - ft - diff --git a/libandroid-navigation/src/commonMain/res/values-my/strings.xml b/libandroid-navigation/src/commonMain/res/values-my/strings.xml deleted file mode 100644 index 442976496..000000000 --- a/libandroid-navigation/src/commonMain/res/values-my/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - လမ်းညွန်မှုအဆုံးသတ်ပါ - လမ်းညွန်မှုအသိပေးခြင်းများ - %sတွင်ရောက်ရှိသည် - ကီလိုမီတာ - မီတာ - မိုင် - ပေ - diff --git a/libandroid-navigation/src/commonMain/res/values-pt-rBR/strings.xml b/libandroid-navigation/src/commonMain/res/values-pt-rBR/strings.xml deleted file mode 100644 index 150f29878..000000000 --- a/libandroid-navigation/src/commonMain/res/values-pt-rBR/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Finalizar navegação - diff --git a/libandroid-navigation/src/commonMain/res/values-pt-rPT/strings.xml b/libandroid-navigation/src/commonMain/res/values-pt-rPT/strings.xml deleted file mode 100644 index 427974729..000000000 --- a/libandroid-navigation/src/commonMain/res/values-pt-rPT/strings.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - Terminar Navegação - Notificações de Navegação - Chegada às %s - km - m - mi - ft - - - dia - dias - - - hor - - min - diff --git a/libandroid-navigation/src/commonMain/res/values-ru/strings.xml b/libandroid-navigation/src/commonMain/res/values-ru/strings.xml deleted file mode 100644 index 553aef065..000000000 --- a/libandroid-navigation/src/commonMain/res/values-ru/strings.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - Завершить - Оповещения навигации - Время прибытия %s - км - м - миль - футов - Ожидаемое прибытие %s - - - - день - дня - дней - дней - - - ч. - - мин. - diff --git a/libandroid-navigation/src/commonMain/res/values-sv/strings.xml b/libandroid-navigation/src/commonMain/res/values-sv/strings.xml deleted file mode 100644 index eccd3f329..000000000 --- a/libandroid-navigation/src/commonMain/res/values-sv/strings.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - Avsluta Navigering - Navigationsmeddelanden - Anländ till %s - km - m - mi - fot - %s ETA - - diff --git a/libandroid-navigation/src/commonMain/res/values-uk/strings.xml b/libandroid-navigation/src/commonMain/res/values-uk/strings.xml deleted file mode 100644 index 6e85aadc7..000000000 --- a/libandroid-navigation/src/commonMain/res/values-uk/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Закінчити навігацію - Навігаційні повідомлення - Прибуття о %s - км - м - mi - фт - diff --git a/libandroid-navigation/src/commonMain/res/values-v21/styles.xml b/libandroid-navigation/src/commonMain/res/values-v21/styles.xml deleted file mode 100644 index 5b6742f17..000000000 --- a/libandroid-navigation/src/commonMain/res/values-v21/styles.xml +++ /dev/null @@ -1,6 +0,0 @@ - - -