Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/react-native-web-community/react-native-web-maps
React Native for Web implementation of react-native-maps
https://github.com/react-native-web-community/react-native-web-maps
maps react-native
Last synced: 8 days ago
JSON representation
React Native for Web implementation of react-native-maps
- Host: GitHub
- URL: https://github.com/react-native-web-community/react-native-web-maps
- Owner: react-native-web-community
- License: mit
- Created: 2017-11-18T09:43:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-06T23:20:30.000Z (almost 2 years ago)
- Last Synced: 2024-11-21T03:26:52.960Z (21 days ago)
- Topics: maps, react-native
- Language: JavaScript
- Homepage: https://react-native-web-community.github.io/react-native-web-maps/storybook
- Size: 2.42 MB
- Stars: 163
- Watchers: 5
- Forks: 62
- Open Issues: 43
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - react-native-web-maps - React Native for Web implementation of react-native-maps (JavaScript)
README
# react-native-web-maps
> React Native for Web implementation of react-native-maps## Getting started
`$ npm install react-native-web-maps --save`To 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](https://developers.google.com/maps/documentation/javascript/get-api-key).
Then, you should add this script to your index.html:
``` html```
## Usage
``` javascript
import MapView from 'react-native-maps';
```
See the original [documentation](https://github.com/airbnb/react-native-maps).The supported components are:
* `MapView`
* `MapView.Marker`
* `MapView.Polyline``MapView`:
- The officially supported props are:
- `region`
- The officially supported events are:
- `onRegionChange`
- `onRegionChangeComplete`
- `onPress``MapView.Marker`:
- The officially supported props are:
- `title`
- `description`
- `coordinate`## Examples
See the [storybook](https://react-native-web-community.github.io/react-native-web-maps/storybook/index.html).## Contributing
PRs are welcome!