Skip to content

Quick way to star a native map application with MapLibre GL JS using React Native.

License

Notifications You must be signed in to change notification settings

maptiler/get-started-react-native-maplibre-gl-js

Repository files navigation

Get started with React Native and MapLibre GL JS

License: MIT

Quick way to star a native map application with MapLibre GL JS using React Native.

A simple fullscreen map application as an example on how to use MapTiler maps together with React Native and MapLibre GL JS for your own native app.

This app is made with expo-dev-client along with the plugin rnmapbox.

  1. Clone this repo
  git clone https://github.com/maptiler/get-started-react-native-maplibre-gl-js.git my-react-map
  1. Navigate to the newly created project folder my-react-map
  cd my-react-map
  1. Install dependencies
  npm install
  1. ⚠️ Open the App.js file and replace YOUR_MAPTILER_API_KEY_HERE with your actual MapTiler API key.

ℹ️ If you don't have an API KEY you can create it for FREE at https://www.maptiler.com/cloud/

  1. Build your project
  # Build your native Android project 
  npx expo run:android

  # Build your native iOS project
  npx expo run:ios
  • ⚠️ expo run:ios requires Xcode (macOS only) installed on your computer. See the setup guide
  • ⚠️ expo run:android requires Android Studio and the Android SDK to be installed. See the setup guide
  1. You will find your app on your virtual device (Emulator) or physical device.

Learn more

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)