Skip to content

Commit 09b5248

Browse files
authored
bump sdk dependencies (#6833)
1 parent 2e5165e commit 09b5248

File tree

16 files changed

+165
-130
lines changed

16 files changed

+165
-130
lines changed

LICENSE.md

Lines changed: 91 additions & 25 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
- Added `RoadComponent.language` value.
2+
- :warning: Changed `EHorizonEdgeMetadata.names` class from `RoadName` to `RoadComponent`.
3+
To migrate change your code from:
4+
```kotlin
5+
val shielded = roadName.shielded
6+
```
7+
into:
8+
```kotlin
9+
val shielded = roadComponent.shield != null
10+
```
11+
- Added support for continuous EV alternatives in `NavigationRouteAlternativesObserver`.
12+
- Fixed issues with map-matching to HOV-only roads.
13+
- Set a limit of simultaneously running onboard route requests to avoid too many tasks blocking too much of the device's computing resources.
14+
- Fixed an issue with Road Access Policy ignoring the setting to map-match to closed road sections, when enabled.

gradle/dependencies.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ ext {
1313
// version which we should use in this build
1414
def mapboxNavigatorVersion = System.getenv("FORCE_MAPBOX_NAVIGATION_NATIVE_VERSION")
1515
if (mapboxNavigatorVersion == null || mapboxNavigatorVersion == '') {
16-
mapboxNavigatorVersion = '123.2.0'
16+
mapboxNavigatorVersion = '124.0.1'
1717
}
1818
println("Navigation Native version: " + mapboxNavigatorVersion)
1919

2020
version = [
21-
mapboxMapSdk : '10.10.0',
21+
mapboxMapSdk : '10.11.0-beta.1',
2222
mapboxSdkServices : '6.10.0',
2323
mapboxNavigator : "${mapboxNavigatorVersion}",
24-
mapboxCommonNative : '23.2.1',
24+
mapboxCommonNative : '23.3.0-beta.1',
2525
mapboxCrashMonitor : '2.0.0',
2626
mapboxAnnotationPlugin : '0.8.0',
2727
mapboxBaseAndroid : '0.8.0',

instrumentation-tests/src/androidTest/java/com/mapbox/navigation/instrumentation_tests/core/WaypointsTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class WaypointsTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.java)
5353
)
5454

5555
private lateinit var mapboxNavigation: MapboxNavigation
56-
private val tolerance = 0.00001
56+
private val tolerance = 0.0001
5757
private val expectedEvWaypointsNamesAndLocations = listOf(
5858
"Leopoldstraße" to ApproximateCoordinates(48.176099, 11.585226, tolerance),
5959
"" to ApproximateCoordinates(48.39023, 11.063842, tolerance),

libnavigation-base/api/current.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,11 @@ package com.mapbox.navigation.base.road.model {
615615

616616
public final class RoadComponent {
617617
method public String? getImageBaseUrl();
618+
method public String getLanguage();
618619
method public com.mapbox.api.directions.v5.models.MapboxShield? getShield();
619620
method public String getText();
620621
property public final String? imageBaseUrl;
622+
property public final String language;
621623
property public final com.mapbox.api.directions.v5.models.MapboxShield? shield;
622624
property public final String text;
623625
}
@@ -1020,7 +1022,7 @@ package com.mapbox.navigation.base.trip.model.eh {
10201022
method public double getLength();
10211023
method public Double? getMeanElevation();
10221024
method public boolean getMotorway();
1023-
method public java.util.List<com.mapbox.navigation.base.trip.model.eh.RoadName> getNames();
1025+
method public java.util.List<com.mapbox.navigation.base.road.model.RoadComponent> getNames();
10241026
method public boolean getRamp();
10251027
method public String getRoadSurface();
10261028
method public double getSpeed();
@@ -1044,7 +1046,7 @@ package com.mapbox.navigation.base.trip.model.eh {
10441046
property public final double length;
10451047
property public final Double? meanElevation;
10461048
property public final boolean motorway;
1047-
property public final java.util.List<com.mapbox.navigation.base.trip.model.eh.RoadName> names;
1049+
property public final java.util.List<com.mapbox.navigation.base.road.model.RoadComponent> names;
10481050
property public final boolean ramp;
10491051
property public final String roadSurface;
10501052
property public final double speed;
@@ -1156,13 +1158,6 @@ package com.mapbox.navigation.base.trip.model.eh {
11561158
@StringDef({com.mapbox.navigation.base.trip.model.eh.RoadClass.MOTORWAY, com.mapbox.navigation.base.trip.model.eh.RoadClass.TRUNK, com.mapbox.navigation.base.trip.model.eh.RoadClass.PRIMARY, com.mapbox.navigation.base.trip.model.eh.RoadClass.SECONDARY, com.mapbox.navigation.base.trip.model.eh.RoadClass.TERTIARY, com.mapbox.navigation.base.trip.model.eh.RoadClass.UNCLASSIFIED, com.mapbox.navigation.base.trip.model.eh.RoadClass.RESIDENTIAL, com.mapbox.navigation.base.trip.model.eh.RoadClass.SERVICE_OTHER}) @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public static @interface RoadClass.Type {
11571159
}
11581160

1159-
public final class RoadName {
1160-
method public String getName();
1161-
method public boolean getShielded();
1162-
property public final String name;
1163-
property public final boolean shielded;
1164-
}
1165-
11661161
public final class RoadSurface {
11671162
field public static final String COMPACTED = "COMPACTED";
11681163
field public static final String DIRT = "DIRT";

libnavigation-base/src/main/java/com/mapbox/navigation/base/internal/factory/RoadFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ object RoadFactory {
1818
text = road.text,
1919
shield = road.shield.toMapboxShield(),
2020
imageBaseUrl = road.imageBaseUrl,
21+
language = road.language,
2122
)
2223
}
2324
return Road(

libnavigation-base/src/main/java/com/mapbox/navigation/base/road/model/RoadComponent.kt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ import com.mapbox.api.directions.v5.models.MapboxShield
44

55
/**
66
* Object that holds road components
7-
* @property text of the road
7+
* @property text contains the current road name user is on, based on the [language] available.
8+
* In certain situations there can be [RoadComponent] that contain [text] as `/` separator.
9+
* The purpose of these separators is to separate the current road name in cases they have a primary
10+
* and secondary name. If you are using [MapboxRoadNameView], then these separators are used to
11+
* separate these names. However if you don't want to use them, you are can directly get access to
12+
* [RoadComponent] from [LocationMatcherResult] and filter the names without `/` separators.
13+
* @property language 2 letters language code or "Unspecified" or empty string
814
* @property shield mapbox designed shield if available otherwise null
915
* @property imageBaseUrl url for the route shield if available otherwise null
1016
*/
1117
class RoadComponent internal constructor(
1218
val text: String,
19+
val language: String,
1320
val shield: MapboxShield? = null,
1421
val imageBaseUrl: String? = null
1522
) {
@@ -23,6 +30,7 @@ class RoadComponent internal constructor(
2330
other as RoadComponent
2431

2532
if (text != other.text) return false
33+
if (language != other.language) return false
2634
if (shield != other.shield) return false
2735
if (imageBaseUrl != other.imageBaseUrl) return false
2836

@@ -34,6 +42,7 @@ class RoadComponent internal constructor(
3442
*/
3543
override fun hashCode(): Int {
3644
var result = text.hashCode()
45+
result = 31 * result + language.hashCode()
3746
result = 31 * result + (shield?.hashCode() ?: 0)
3847
result = 31 * result + (imageBaseUrl?.hashCode() ?: 0)
3948
return result
@@ -43,6 +52,11 @@ class RoadComponent internal constructor(
4352
* Returns a string representation of the object.
4453
*/
4554
override fun toString(): String {
46-
return "RoadComponent(text='$text', shield=$shield, imageBaseUrl=$imageBaseUrl)"
55+
return "RoadComponent(" +
56+
"text='$text', " +
57+
"language='$language', " +
58+
"shield=$shield, " +
59+
"imageBaseUrl=$imageBaseUrl" +
60+
")"
4761
}
4862
}

libnavigation-base/src/main/java/com/mapbox/navigation/base/trip/model/eh/EHorizonEdgeMetadata.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.mapbox.navigation.base.trip.model.eh
22

3+
import com.mapbox.navigation.base.road.model.RoadComponent
4+
35
/**
46
* Edge metadata
57
*
@@ -45,7 +47,7 @@ class EHorizonEdgeMetadata internal constructor(
4547
val bridge: Boolean,
4648
val tunnel: Boolean,
4749
val toll: Boolean,
48-
val names: List<RoadName>,
50+
val names: List<RoadComponent>,
4951
val laneCount: Byte?,
5052
val meanElevation: Double?,
5153
val curvature: Byte,

libnavigation-base/src/main/java/com/mapbox/navigation/base/trip/model/eh/EHorizonMapper.kt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.mapbox.navigation.base.trip.model.eh
22

3+
import com.mapbox.navigation.base.internal.extensions.toMapboxShield
4+
import com.mapbox.navigation.base.road.model.RoadComponent
35
import com.mapbox.navigation.base.trip.model.roadobject.RoadObjectPosition
46
import com.mapbox.navigation.base.trip.model.roadobject.distanceinfo.GantryDistanceInfo
57
import com.mapbox.navigation.base.trip.model.roadobject.distanceinfo.Gate
@@ -408,18 +410,20 @@ private fun FunctionalRoadClass.mapToRoadClass(): String {
408410
}
409411
}
410412

411-
private fun mapNames(names: List<com.mapbox.navigator.RoadName>): List<RoadName> {
412-
val namesNames = mutableListOf<RoadName>()
413+
private fun mapNames(names: List<com.mapbox.navigator.RoadName>): List<RoadComponent> {
414+
val roadComponents = mutableListOf<RoadComponent>()
413415
names.forEach {
414-
namesNames.add(it.mapToRoadName())
416+
roadComponents.add(it.mapToRoadComponent())
415417
}
416-
return namesNames.toList()
418+
return roadComponents.toList()
417419
}
418420

419-
private fun com.mapbox.navigator.RoadName.mapToRoadName(): RoadName {
420-
return RoadName(
421-
name,
422-
shielded
421+
private fun com.mapbox.navigator.RoadName.mapToRoadComponent(): RoadComponent {
422+
return RoadComponent(
423+
text,
424+
language,
425+
shield.toMapboxShield(),
426+
imageBaseUrl,
423427
)
424428
}
425429

libnavigation-base/src/main/java/com/mapbox/navigation/base/trip/model/eh/RoadName.kt

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)