Skip to content

Latest commit

 

History

History
60 lines (47 loc) · 1.49 KB

install.md

File metadata and controls

60 lines (47 loc) · 1.49 KB

Expo Installation

⚠️ This package cannot be used in the "Expo Go" app because it requires custom native code.

First install the package with expo, yarnor npm.

Install the latest release:

expo install @rnmapbox/maps

Installing other versions

Replace @rnmapbox/maps with the following to install other versions:

  • rnmapbox/maps#main installs the latest source from git

Plugin Configuration

After installing this package, add the config plugin to the plugins array of your app.{json,config.js,config.ts}:

{
  "expo": {
    "plugins": [
      [
        "@rnmapbox/maps",
        {
          "RNMapboxMapsImpl": "maplibre"
        }
      ]
    ]
  }
}

Next, rebuild your app as described in the "Adding custom native code" guide.

For mapbox or mapbox-gl you'll need to provide RNMapboxMapsDownloadToken as well.

{
  "expo": {
    "plugins": [
      [
        "@rnmapbox/maps",
        {
          "RNMapboxMapsImpl": "mapbox",
          "RNMapboxMapsDownloadToken": "sk.ey...qg"
        }
      ]
    ]
  }
}

Manual Setup

For bare workflow projects, you can follow the manual setup guides: