Navigating using mapbox V3 core framework (android only for now)
npm install react-native-mapbox-navigation
Dentro de la carpeta android: en gradle.properties añadir {
MAPBOX_DOWNLOADS_TOKEN=SECRET_TOKEN_HERE
}.
en gradle.build añadir {
allprojects {
repositories {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
}
}.
En android/app/src/main/AndroidManifest.xml
añadir
<!-- Tiene que estar dentro de application -->
<meta-data android:name="MAPBOX_ACCESS_TOKEN"
android:value="PUBLIC_TOKEN_HERE" />
import { MapboxNavigationView } from "react-native-mapbox-navigation";
// ...
<MapboxNavigationView origin={[]} destination={[]} waypoints={[]} />
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library