@jadamsbit/react-native-mapbox-navigation 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationManager.kt +0 -20
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationView.kt +0 -13
- package/example/App.js +2 -2
- package/example/android/app/src/main/AndroidManifest.xml +1 -1
- package/example/android/gradle.properties +1 -1
- package/package.json +2 -1
- package/react-native-mapbox-navigation.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -85,7 +85,7 @@ dependencies {
|
|
|
85
85
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
86
86
|
|
|
87
87
|
// mapbox dependencies
|
|
88
|
-
implementation "com.mapbox.navigation:android:2.
|
|
88
|
+
implementation "com.mapbox.navigation:android:2.18.0"
|
|
89
89
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
90
90
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
91
91
|
}
|
|
@@ -99,24 +99,4 @@ class MapboxNavigationManager(var mCallerContext: ReactApplicationContext) : Sim
|
|
|
99
99
|
view.setWaypoints(waypoints)
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
@ReactProp(name = "vehicleMaxHeight")
|
|
104
|
-
fun setMaxHeight(view: MapboxNavigationView, height: Int?) {
|
|
105
|
-
if (height == null) {
|
|
106
|
-
view.setMaxHeight(1.6)
|
|
107
|
-
return
|
|
108
|
-
}
|
|
109
|
-
view.setMaxHeight(height?.toDouble())
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@ReactProp(name = "vehicleMaxWidth")
|
|
113
|
-
fun setMaxWidth(view: MapboxNavigationView, width: Int?) {
|
|
114
|
-
if (width == null) {
|
|
115
|
-
view.setMaxWidth(1.9)
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
view.setMaxWidth(width?.toDouble())
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
102
|
}
|
|
@@ -91,8 +91,6 @@ class MapboxNavigationView(private val context: ThemedReactContext, private val
|
|
|
91
91
|
private var destination: Point? = null
|
|
92
92
|
private var shouldSimulateRoute = false
|
|
93
93
|
private var showsEndOfRouteFeedback = false
|
|
94
|
-
private var maxHeight: Double? = null
|
|
95
|
-
private var maxWidth: Double? = null
|
|
96
94
|
/**
|
|
97
95
|
* Debug tool used to play, pause and seek route progress events that can be used to produce mocked location updates along the route.
|
|
98
96
|
*/
|
|
@@ -667,9 +665,6 @@ class MapboxNavigationView(private val context: ThemedReactContext, private val
|
|
|
667
665
|
.profile(DirectionsCriteria.PROFILE_DRIVING)
|
|
668
666
|
.steps(true)
|
|
669
667
|
|
|
670
|
-
maxHeight?.let { routeOptionsBuilder.maxHeight(it) }
|
|
671
|
-
maxWidth?.let { routeOptionsBuilder.maxWidth(it) }
|
|
672
|
-
|
|
673
668
|
val routeOptions = routeOptionsBuilder.build()
|
|
674
669
|
|
|
675
670
|
mapboxNavigation.requestRoutes(
|
|
@@ -783,12 +778,4 @@ class MapboxNavigationView(private val context: ThemedReactContext, private val
|
|
|
783
778
|
fun setMute(mute: Boolean) {
|
|
784
779
|
this.isVoiceInstructionsMuted = mute
|
|
785
780
|
}
|
|
786
|
-
|
|
787
|
-
fun setMaxHeight(maxHeight: Double?) {
|
|
788
|
-
this.maxHeight = maxHeight
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
fun setMaxWidth(maxWidth: Double?) {
|
|
792
|
-
this.maxWidth = maxWidth
|
|
793
|
-
}
|
|
794
781
|
}
|
package/example/App.js
CHANGED
|
@@ -41,8 +41,8 @@ const App = () => {
|
|
|
41
41
|
return (
|
|
42
42
|
<SafeAreaView style={backgroundStyle}>
|
|
43
43
|
<NavigationComponent
|
|
44
|
-
origin={[-
|
|
45
|
-
destination={[-
|
|
44
|
+
origin={[-82.5188, 37.4793]}
|
|
45
|
+
destination={[-82.532, 37.4906]}
|
|
46
46
|
/>
|
|
47
47
|
</SafeAreaView>
|
|
48
48
|
);
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
</intent-filter>
|
|
26
26
|
</activity>
|
|
27
27
|
<meta-data android:name="MAPBOX_ACCESS_TOKEN"
|
|
28
|
-
android:value="pk.
|
|
28
|
+
android:value="pk.eyJ1IjoiYWRhbXNqYW1pZSIsImEiOiJja211enlwMXUwMGNjMm5xbjB2bjZrazBkIn0.U4IzgCKh43lsGEoeOSMT4g" />
|
|
29
29
|
</application>
|
|
30
30
|
</manifest>
|
|
@@ -27,7 +27,7 @@ android.enableJetifier=true
|
|
|
27
27
|
# Version of flipper SDK to use with React Native
|
|
28
28
|
FLIPPER_VERSION=0.99.0
|
|
29
29
|
|
|
30
|
-
MAPBOX_DOWNLOADS_TOKEN=
|
|
30
|
+
MAPBOX_DOWNLOADS_TOKEN=sk.eyJ1IjoiYWRhbXNqYW1pZSIsImEiOiJjbHN4Z3I1emIwMnFlMmtubnhna3hoZ2Y5In0.LvUt6Xjj8imNaqoJCE9Hkg
|
|
31
31
|
|
|
32
32
|
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError
|
|
33
33
|
org.gradle.daemon=true
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jadamsbit/react-native-mapbox-navigation",
|
|
3
3
|
"title": "React Native Mapbox Navigation",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"description": "Smart Mapbox turn-by-turn routing based on real-time traffic for React Native.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"navigation"
|
|
14
14
|
],
|
|
15
15
|
"license": "MIT",
|
|
16
|
+
"licenseFilename": "LICENSE",
|
|
16
17
|
"readmeFilename": "README.md",
|
|
17
18
|
"bugs": {
|
|
18
19
|
"url": "https://github.com/jadamsbit/react-native-mapbox-navigation/issues"
|