Skip to main content

expo-maps

Version: 55.0.6 Provides a Map component that uses Google Maps on Android and Apple Maps on iOS. Display interactive maps with markers, regions, and overlays.

Installation

npx expo install expo-maps

Usage

import { Map, Marker } from 'expo-maps';
import { View, StyleSheet } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Map
        style={styles.map}
        initialRegion={{
          latitude: 37.78825,
          longitude: -122.4324,
          latitudeDelta: 0.0922,
          longitudeDelta: 0.0421,
        }}
      >
        <Marker
          coordinate={{
            latitude: 37.78825,
            longitude: -122.4324,
          }}
          title="San Francisco"
          description="City by the Bay"
        />
      </Map>
    </View>
  );
}

const styles = StyleSheet.create({
  container: { flex: 1 },
  map: { flex: 1 },
});

API Reference

Map Component

initialRegion
Region
Initial map region
region
Region
Controlled region (updates map)
onRegionChange
(region: Region) => void
Called when region changes
mapType
'standard' | 'satellite' | 'hybrid'
Map display type
showsUserLocation
boolean
Show user location indicator

Marker Component

coordinate
{ latitude: number; longitude: number }
required
Marker position
title
string
Marker title
description
string
Marker description

Platform Support

PlatformSupportedProvider
iOSApple Maps
AndroidGoogle Maps
Web-

Configuration

Android: Add Google Maps API key to app.json:
{
  "android": {
    "config": {
      "googleMaps": {
        "apiKey": "YOUR_GOOGLE_MAPS_API_KEY"
      }
    }
  }
}

Resources