@busable/turn-by-turn v0.5.32
@busable/turn-by-turn
Mapbox React Native SDKs enable interactive maps and real-time, traffic-aware turn-by-turn navigation, dynamically adjusting routes to avoid congestion.
Installation
1. Download package
# yarn
yarn add @busable/turn-by-turn
# npm
npm install @busable/turn-by-turniOS Specific Instructions
Place your secret token in a .netrc file in your OS root directory.
machine api.mapbox.com login mapbox password <INSERT SECRET TOKEN>Install pods
cd ios && pod installPlace your public token in your Xcode project's
Info.plistand add aMBXAccessTokenkey whose value is your public access token.Add the
UIBackgroundModeskey toInfo.plistwithaudioandlocationif it is not already present. This will allow your app to deliver audible instructions while it is in the background or the device is locked.<key>UIBackgroundModes</key> <array> <string>audio</string> <string>location</string> </array>
Android Specific Instructions
Place your secret token in your android app's top level
gradle.propertiesor«USER_HOME»/.gradle/gradle.propertiesfileMAPBOX_DOWNLOADS_TOKEN=<YOUR_MAPBOX_DOWNLOADS_TOKEN>Open up your project-level
build.gradlefile. Declare the Mapbox Downloads API'sreleases/mavenendpoint in the allprojectsrepositoriesblock.allprojects { repositories { maven { url 'https://api.mapbox.com/downloads/v2/releases/maven' authentication { basic(BasicAuthentication) } credentials { // Do not change the username below. // This should always be `mapbox` (not your username). username = "mapbox" // Use the secret token you stored in gradle.properties as the password password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: "" } } } }Add Resources To do so create a new string resource file in your app module
(e.g. app/src/main/res/values/mapbox_access_token.xml)with your public Mapbox API token:<?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools"> <string name="mapbox_access_token" translatable="false" tools:ignore="UnusedResources">YOUR_MAPBOX_ACCESS_TOKEN</string> </resources>For more details installation you can read the Official docs of Mapbox.
License
MIT
Made with create-react-native-library
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago