React Native for Web implementation of react-native-maps
npm install react-native-web-maps$ npm install react-native-web-maps --saveTo implement react-native-web-maps we're using the react-google-maps package:
$ npm install react-google-maps --save
Alias the package in your webpack config:
```
resolve: {
alias: {
'react-native': 'react-native-web',
...
'react-native-maps': 'react-native-web-maps',
}
}
You need to have a Google Maps Javascript API key to use the map, you can get one here.
Then, you should add this script to your index.html:
` html`
` javascript`
import MapView from 'react-native-maps';
See the original documentation.
The supported components are:
* MapViewMapView.Marker
* MapView.Polyline
*
MapView:region
- The officially supported props are:
- onRegionChange
- The officially supported events are:
- onRegionChangeComplete
- onPress
-
MapView.Marker:title
- The officially supported props are:
- description
- coordinate`
-