React Native Mapbox GL Demo
Demo Application for React Native Mapbox GL
What is Mapbox?
Mapbox is the location data platform for mobile and web applications. We provide building blocks to add location features like maps, search, and navigation into any experience you create. Use our simple and powerful APIs & SDKs and our open source libraries for interactivity and control.
Sign up for Mapbox
- Make sure you are in the example directory
Create a file called
accesstokenin the root of the example project and just paste in your Mapbox access token.
Install our dependencies using
Start React Native Packager
Open up another tab in your Terminal and run
Run Android Simulator
- Open up Android Studio and build with gradle
- Start Android emulator
adb reverse tcp:8081 tcp:8081to foward port to packager(needed for hot reloading, if you're not developing you can skip this step).
If the build fails make sure gradle has permission to build from cli
cd android chmod +x gradlew
Run iOS Simulator
You can run this with the react-native cli or Xcode
If you run into
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/RNMapboxGLExample.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist
Just run the example from Xcode, it seems to be an issue with RN.