@jadamsbit/react-native-mapbox-navigation 1.0.12 → 1.0.14
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/gradle.properties +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +15 -0
- package/dist/typings.d.ts +37 -0
- package/dist/typings.js +1 -0
- package/example/android/build.gradle +1 -1
- package/example/android/gradle.properties +1 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -88,7 +88,7 @@ dependencies {
|
|
|
88
88
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
89
89
|
|
|
90
90
|
// mapbox dependencies
|
|
91
|
-
implementation "com.mapbox.navigation:android:2.
|
|
91
|
+
implementation "com.mapbox.navigation:android:2.17.0"
|
|
92
92
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
93
93
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
94
94
|
implementation 'androidx.core:core:1.12.0'
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { requireNativeComponent, StyleSheet } from "react-native";
|
|
3
|
+
const MapboxNavigation = (props) => {
|
|
4
|
+
return <RNMapboxNavigation style={styles.container} {...props} />;
|
|
5
|
+
};
|
|
6
|
+
const RNMapboxNavigation = requireNativeComponent(
|
|
7
|
+
"MapboxNavigation",
|
|
8
|
+
MapboxNavigation
|
|
9
|
+
);
|
|
10
|
+
const styles = StyleSheet.create({
|
|
11
|
+
container: {
|
|
12
|
+
flex: 1,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
export default MapboxNavigation;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** @type {[number, number]}
|
|
2
|
+
* Provide an array with longitude and latitude [$longitude, $latitude]
|
|
3
|
+
*/
|
|
4
|
+
declare type Coordinate = [number, number];
|
|
5
|
+
declare type OnLocationChangeEvent = {
|
|
6
|
+
nativeEvent?: {
|
|
7
|
+
latitude: number;
|
|
8
|
+
longitude: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare type OnRouteProgressChangeEvent = {
|
|
12
|
+
nativeEvent?: {
|
|
13
|
+
distanceTraveled: number;
|
|
14
|
+
durationRemaining: number;
|
|
15
|
+
fractionTraveled: number;
|
|
16
|
+
distanceRemaining: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
declare type OnErrorEvent = {
|
|
20
|
+
nativeEvent?: {
|
|
21
|
+
message?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export interface IMapboxNavigationProps {
|
|
25
|
+
origin: Coordinate;
|
|
26
|
+
destination: Coordinate;
|
|
27
|
+
shouldSimulateRoute?: boolean;
|
|
28
|
+
onLocationChange?: (event: OnLocationChangeEvent) => void;
|
|
29
|
+
onRouteProgressChange?: (event: OnRouteProgressChangeEvent) => void;
|
|
30
|
+
onError?: (event: OnErrorEvent) => void;
|
|
31
|
+
onCancelNavigation?: () => void;
|
|
32
|
+
onArrive?: () => void;
|
|
33
|
+
showsEndOfRouteFeedback?: boolean;
|
|
34
|
+
hideStatusView?: boolean;
|
|
35
|
+
mute?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
package/dist/typings.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# Specifies the JVM arguments used for the daemon process.
|
|
11
11
|
# The setting is particularly useful for tweaking memory settings.
|
|
12
12
|
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
|
|
13
|
-
org.gradle.jvmargs=-
|
|
13
|
+
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=4096m
|
|
14
14
|
|
|
15
15
|
# When configured, Gradle will run in incubating parallel mode.
|
|
16
16
|
# This option should only be used with decoupled projects. More details, visit
|
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.14",
|
|
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",
|