This package cannot be used in the "Expo Go" app because it requires custom native code.
First install the package with yarn, npm, or expo install rnmapbox/maps#main.
expo install rnmapbox/maps#mainAfter installing this npm package, add the config plugin to the plugins array of your app.json or app.config.js:
{
"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": "maplibre",
"RNMapboxMapsDownloadToken": "sk.ey...qg"
}
]
]
}
}For bare workflow projects, you can follow the manual setup guides: