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
Controlled region (updates map)
Called when region changes
mapType
'standard' | 'satellite' | 'hybrid'
Map display type
Show user location indicator
Marker Component
coordinate
{ latitude: number; longitude: number }
required
Marker position
| Platform | Supported | Provider |
|---|
| iOS | ✅ | Apple Maps |
| Android | ✅ | Google Maps |
| Web | ❌ | - |
Configuration
Android: Add Google Maps API key to app.json:
{
"android": {
"config": {
"googleMaps": {
"apiKey": "YOUR_GOOGLE_MAPS_API_KEY"
}
}
}
}
Resources