react-native-maps /react-native-maps

React Native Mapview component for iOS + Android

★ 16,017⑂ 4,957👁 210⑃ 1,564● 4,156▤ 390
TypeScriptMITCreated 2015-12-29
下载:v1.29.11v1.29.11 ↓1.29.112026-09-27
+0
日增长
16,017
stars
4,957
forks
210
watchers
1,564
prs
4,156
issues
390
releases

README

react-native-maps 

React Native Map components for iOS + Android

 Contributing

This project is being maintained by a small group of people, and any help with issues and pull requests are always appreciated. If you are able and willing to contribute, please read the guidelines.

 Installation

See Installation Instructions.

See Setup Instructions for the Included Example Project.

 Compatibility

 React Native Compatibility

 Version Requirements:

 Compatibility

 Fabric (New Architecture)

| Version          | React Native Requirement |
| ---------------- | ------------------------ |
| 1.26.1+          | = 0.81.1                |
| 1.26.0 and below | = 0.76                  |

 Old Architecture

| Version         | React Native Requirement |
| --------------- | ------------------------ |
| 1.14.0 - 1.20.1 | = 0.74                  |
| = 0.64.3                |

 Component API

 Component API

 Component API

 Component API

 Component API

 Component API

 Component API

 Component API

 Component API

 Component API

 General Usage

js
import MapView from 'react-native-maps';


or

js
var MapView = require('react-native-maps');


This MapView component is built so that features on the map (such as Markers, Polygons, etc.) are
specified as children of the MapView itself. This provides an intuitive and react-like API for
declaratively controlling features on the map.

 Rendering a Map with an initial region

 MapView

jsx



 Using a MapView while controlling the region as state

jsx
getInitialState() {
  return {
    region: {
      latitude: 37.78825,
      longitude: -122.4324,
      latitudeDelta: 0.0922,
      longitudeDelta: 0.0421,
    },
  };
}

onRegionChange(region) {
  this.setState({ region });
}

render() {
  return (
    
  );
}


 Rendering a list of markers on a map

jsx
import {Marker} from 'react-native-maps';


  {this.state.markers.map((marker, index) = (
    
  ))}
;


 Rendering a Marker with a custom image

1. You need to generate an png image with various resolution (lets call them custom_pin) - for more information go to Android, iOS
2. put all images in Android drawables and iOS assets dir
3. Now you can use the following code:

jsx



Note: You can also pass the image binary data like image={require('custom_pin.png')}, but this will not scale good with the different screen sizes.

 Rendering a Marker with a custom view

Note: This has performance implications, if you wish for a simpler solution go with a custom image (save your self the headache)

jsx

  



 Rendering a custom Marker with a custom Callout

jsx
import {Callout} from 'react-native-maps';


  
  
    
  
;


 Draggable Markers

jsx

   this.setState({ x: e.nativeEvent.coordinate })}
  /



 Using a custom Tile Overlay

 Tile Overlay using tile server

jsx
import {UrlTile} from 'react-native-maps';


  
;


For Android: add the following line in your AndroidManifest.xml

xml



For IOS: configure App Transport Security in your app

 Tile Overlay using 

Top issues

Discussions

Latest release

v1.29.11 v1.29.11 2026-09-27
1.29.11 (2026-09-27)


 Bug Fixes

 ios: keep google marker icon when the marker is re-added to the map (5950) (b16c1af)

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON