0.5.32 • Published 8 months ago

@busable/turn-by-turn v0.5.32

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
8 months ago

@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-turn

iOS Specific Instructions

  1. Place your secret token in a .netrc file in your OS root directory.

    machine api.mapbox.com
    login mapbox
    password <INSERT SECRET TOKEN>
  2. Install pods

    cd ios && pod install
  3. Place your public token in your Xcode project's Info.plist and add a MBXAccessToken key whose value is your public access token.

  4. Add the UIBackgroundModes key to Info.plist with audio and location if 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

  1. Place your secret token in your android app's top level gradle.properties or «USER_HOME»/.gradle/gradle.properties file

    MAPBOX_DOWNLOADS_TOKEN=<YOUR_MAPBOX_DOWNLOADS_TOKEN>
  2. Open up your project-level build.gradle file. Declare the Mapbox Downloads API's releases/maven endpoint in the allprojects repositories block.

    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'] ?: ""
                  }
              }
        }
    }
  3. 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

0.5.32

8 months ago

0.5.31

8 months ago

0.5.30

8 months ago

0.5.29

8 months ago

0.5.28

8 months ago

0.5.27

8 months ago

0.5.26

8 months ago

0.5.25

9 months ago

0.5.24

9 months ago

0.5.23

9 months ago

0.5.22

9 months ago

0.5.21

9 months ago

0.5.20

10 months ago

0.5.19

10 months ago

0.5.18

10 months ago

0.5.17

11 months ago

0.5.16

11 months ago

0.5.15

11 months ago

0.5.14

11 months ago

0.5.13

11 months ago

0.5.12

11 months ago

0.5.11

11 months ago

0.5.10

11 months ago

0.5.9

11 months ago

0.5.8

11 months ago

0.5.7

11 months ago

0.5.6

12 months ago

0.5.5

12 months ago

0.5.4

12 months ago

0.5.3

12 months ago

0.5.2

12 months ago