How to Add a Map to Your Expo App: react-native-maps vs expo-maps

DavidDavid October 12, 2026 9 min read

How to add a map to your Expo app, in short

You add a map to an Expo app by installing react-native-maps with npx expo install react-native-maps and rendering a MapView that fills its container. Give it an initialRegion (a center latitude and longitude plus how far to zoom) and drop Marker components inside it for each place you want to pin. On iOS that shows Apple Maps with no extra setup. On Android it shows Google Maps, which works in Expo Go for testing but needs your own Google Maps API key in the app config before you build for the Play Store.

The code is the easy part. The decisions that cost people time are choosing between react-native-maps and expo-maps, shipping an Android build with no API key (and a blank map), leaving that key unrestricted, and asking for location permission just to draw a blue dot nobody asked for. This guide covers each one.

react-native-maps vs expo-maps: which one to use

Expo's docs list two map libraries. They draw the same native maps, but they are at very different stages.

react-native-maps vs expo-maps (per Expo's reference pages)

react-native-mapsexpo-maps
Who builds itCommunity library, listed under Expo's third-party librariesExpo
StatusLong-standing, widely usedAlpha. Expo's docs say it will frequently experience breaking changes
Works in Expo GoYesNo. Needs a development build
iOS mapApple Maps by default, or Google Maps with PROVIDER_GOOGLE and an iOS keyApple Maps only (Google Maps is supported on Android only)
Android mapGoogle Maps (needs an API key to ship)Google Maps (needs an API key)
API styleJSX children: <MapView><Marker /></MapView>Props: arrays like markers and annotations, with separate AppleMaps.View and GoogleMaps.View components

My recommendation for an indie app heading to the App Store: use react-native-maps. You can test it in Expo Go today, one component works on both platforms, and you are not building your launch on a library whose own docs warn about breaking changes. expo-maps is worth watching, especially if you want newer Apple Maps features, but alpha software is a poor fit for a submission deadline.

Step 1: Install react-native-maps and render a map

  1. Run: npx expo install react-native-maps (the Expo installer picks the version that matches your SDK).
  2. Import it: import MapView, { Marker } from 'react-native-maps'.
  3. Render it with a size. A MapView with no height renders nothing, so give it style={{ flex: 1 }} inside a container that has flex: 1, or a fixed height.
  4. Set where it starts: initialRegion={{ latitude: 37.78825, longitude: -122.4324, latitudeDelta: 0.0922, longitudeDelta: 0.0421 }}. The deltas control the zoom: smaller numbers mean closer in.
  5. Open the project in Expo Go and you should see a map.

Use initialRegion when you only care where the map starts and the user can pan freely after that. Per the react-native-maps docs, changing initialRegion after the map mounts does nothing. If your code needs to move the map (say, to recenter on a search result), use the controlled region prop with onRegionChange, or call a method like animateToRegion through a ref.

Step 2: Add markers

Each pin is a Marker child of the MapView, with a coordinate and optional title and description that show in a callout when tapped. For a list of places, map over your data and render one Marker per item with a stable key, like the place's id rather than its array index.

  • coordinate={{ latitude, longitude }} is required.
  • title and description fill the default callout.
  • For a custom pin, react-native-maps supports an image prop or a custom view as the marker's child.
  • Keep the number of markers you render sensible. If you have hundreds of places, only load the ones in the visible region from your backend instead of dropping everything on the map at once.

Where do the coordinates come from? Usually from your own database: each store, event or listing row stores a latitude and longitude. If you are on Supabase, that is two numeric columns or a PostGIS column; [how to set up Supabase with Expo](/blog/how-to-set-up-supabase-with-expo) covers the client side.

Step 3: Show the user's location (only if it helps)

react-native-maps has a showsUserLocation prop that draws the familiar blue dot. Its docs carry an important warning: you need runtime location permission before you set it to true, otherwise it fails silently. The map does not ask for you.

  1. Install expo-location and set a specific locationWhenInUsePermission message in its config plugin.
  2. Request foreground permission when the user taps something like "Show stores near me", not when the map first appears.
  3. Only set showsUserLocation to true once status is 'granted'. Until then, show the map centered on a sensible default (their city, or your content).
  4. To center the map on the user, read their position with expo-location and pass it as the region, or animate to it through a ref.

The full permission flow, including what to do when someone denies it, is in [how to add location to your Expo app](/blog/how-to-add-location-to-your-expo-app) and [how to request permissions in your Expo app](/blog/how-to-request-permissions-in-your-expo-app). A map that shows places does not need the user's location at all, so do not request it unless the feature uses it. Apple's guideline 5.1.5 says to use Location Services only when directly relevant to your app's features.

Step 4: Set up a Google Maps API key before you ship Android

This is the step that catches people. Expo's docs say no extra setup is needed in Expo Go, but deploying the app binary to the stores requires additional steps for Google Maps. Android maps are Google Maps, so your Android build needs its own key. Here is the flow from Expo's react-native-maps page:

  1. In the Google Cloud console, create a project and enable the Maps SDK for Android. If you already have a project for Google Sign-In, enable it there.
  2. Get your SHA-1 certificate fingerprint. For Play Store builds, upload your app to Google Play Console at least once, then copy the app signing key's SHA-1 from App integrity. For development builds, copy it from your project's Credentials page on expo.dev.
  3. Create an API key, restrict it to Android apps, and add your android.package plus that SHA-1.
  4. Add the key to the react-native-maps config plugin as androidGoogleMapsApiKey.
  5. Rebuild the app binary. An emulator build is a quick way to confirm the map loads.

To keep the key out of your repo, use app.config.js and read it from an environment variable, for example androidGoogleMapsApiKey: process.env.GOOGLE_MAPS_API_KEY, then store the value as an EAS environment variable. [How to manage environment variables in Expo](/blog/how-to-manage-environment-variables-in-expo) walks through that setup. Expo's docs also note that if EAS Build does not pick up a key from a .env file, your project needs an .easignore that does not exclude .env.

Want Google Maps on iOS as well? With react-native-maps, enable the Maps SDK for iOS, create a key restricted to your ios.bundleIdentifier, set it as iosGoogleMapsApiKey in the plugin, and pass provider={PROVIDER_GOOGLE} to MapView. Most apps do not need this: Apple Maps on iOS needs no key and looks native there.

What App Review cares about

A map on its own rarely causes a rejection. The problems come from what surrounds it.

  • Location is requested in context, with a usage message that names the feature, and denying it does not break the rest of the app.
  • The map actually loads in the build you submit. Test a release build, not just Expo Go, so a missing or misconfigured key does not show up as a blank screen in front of the reviewer.
  • If you send the user's location to your server, your App Store privacy details say so. See [App Privacy details in App Store Connect](/blog/app-privacy-details-app-store-connect).
  • The app is more than a map wrapper. An app that only shows a map of something the web already does well is the kind of thing guideline 4.2 (minimum functionality) is about; see [guideline 4.2 rejections](/blog/app-store-rejection-guideline-4-2).

How to test your map

  • Expo Go first: react-native-maps is included, so check layout, markers and callouts there.
  • Then a development build or [TestFlight](/blog/testflight-beta-testing-guide-for-expo-apps) build, which is where your config plugin settings and API keys actually apply. [Expo Go vs development build](/blog/expo-go-vs-development-build) explains why they differ.
  • Android release build: confirm the map tiles load. A grey map with a Google logo usually points at the API key, its restrictions, or a SHA-1 mismatch.
  • Deny location, then use the map. It should still show your content.
  • Open the map with no network to see what users get offline, and show a clear message rather than an empty grid.
  • Switch the device to dark mode and check your markers are still readable.

Have Claude Code build it for you

Open your project in the Claude Code desktop app and describe the screen, not just "add a map". A prompt that works:

Add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) such as "never commit API keys; Maps keys come from EAS environment variables" so a later session does not paste the key into app.json to fix a blank map. Then do the Google Cloud part yourself: creating and restricting the key is a few minutes in the console, and it is your billing account on the line.

The short version

To add a map to your Expo app: install react-native-maps, render a sized MapView with an initialRegion, and add Marker children for your places. iOS uses Apple Maps with no key; for Android, create a Google Maps API key restricted to your package and SHA-1, add it as androidGoogleMapsApiKey from an environment variable, and test a real build before you submit. Only ask for location if the map uses it.

If you are building your first iOS app with Claude Code and Expo and want a second pair of eyes on it before App Review, bring it to App Store Launch Club. Members share their builds for feedback, and the [curriculum](/curriculum) covers the full path from first build to first users. Join at applaunchclub.co for $9 a month.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

Does react-native-maps work in Expo Go?

Yes. Expo's docs list react-native-maps as included in Expo Go, and no extra setup is needed to test there. You only need the Google Maps API key setup when you build the app binary for the stores.

Do I need a Google Maps API key for iOS?

Not with react-native-maps' default provider, which is Apple Maps on iOS. You only need an iOS key if you choose Google Maps on iOS with provider={PROVIDER_GOOGLE}. Android always uses Google Maps, so Android release builds need a key.

Should I use expo-maps or react-native-maps?

For an app you plan to ship soon, react-native-maps. expo-maps is in alpha, Expo's docs say it will frequently have breaking changes, and it does not run in Expo Go. It also supports Google Maps on Android only, so iOS always gets Apple Maps.

Why is my map blank or grey on Android?

In a release or development build, that usually points at the Google Maps API key: it is missing from the config plugin, the Maps SDK for Android is not enabled, or the key's package name or SHA-1 restriction does not match the build. Rebuild after fixing it, since the key lives in the binary.

Why does showsUserLocation not show the blue dot?

Per the react-native-maps docs, you need location permission before setting showsUserLocation to true, or it fails silently. Request foreground permission with expo-location first, then turn the prop on.

How do I move the map after it loads?

initialRegion only sets the starting view and is ignored after mount. Use the controlled region prop with onRegionChange, or keep a ref to the MapView and call animateToRegion.

Is it safe to put a Google Maps API key in my app?

The key ends up in your app binary either way, so the protection is restriction, not secrecy. Restrict it to your Android package name and SHA-1 (or iOS bundle ID) and to the Maps SDK, keep it out of your repo with environment variables, and set a budget alert in Google Cloud.

Last reviewed by David on October 12, 2026

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Add Notification Actions to Your Expo App

To add notification actions to an Expo app, register a category with Notifications.setNotificationCategoryAsync, give it action buttons (and optionally a text reply), set categoryIdentifier on the notification, then read response.actionIdentifier in a response listener. Here is every action option, how to handle taps when the app was closed, the Android and iOS differences, and a Claude Code prompt that wires it all up.

David 8 min
Read article
ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog