react-google-maps
React.js Google Maps integration component
Getting Help
For support or usage questions like “how do I do X with React-Google-Maps” and “my code doesn't work”, please search and ask on StackOverflow with a google-maps tag or use react-google-maps as a keyword first.
We ask you to do this because StackOverflow has a much better job at keeping popular questions visible. Unfortunately good answers get lost and outdated on GitHub.
Some questions take a long time to get an answer. If your question gets closed or you don't get a reply on StackOverflow for longer than a few days, we encourage you to post an issue linking to your question. We will close your issue but this will give people watching the repo an opportunity to see your question and reply to it on StackOverflow if they know the answer.
Please be considerate when doing this as this is not the primary purpose of the issue tracker.
Versions
Call for maintainers
As the author (tomchentw) currently doesn't actively use this module, he's looking for awesome contributors to help and keep the community healthy. Please don't hesitate to contact him directly. See #266 for more information.
Documentation
Basically just a simple wrapper around Google Maps Javascript API. Also check out the demo app and it's source under src/app folder.
Note: this doc is under development for v6.0.0. Find docs for v5.x and v4.x with the git tags.
withGoogleMap
import withGoogleMap GoogleMap Marker from "react-google-maps"; // Wrap all `react-google-maps` components with `withGoogleMap` HOC// and name it GettingStartedGoogleMapconst GettingStartedGoogleMap = ;// Then, render it:;
GoogleMap
<GoogleMap = = =/>
Marker
<Marker = = =/>
Circle
<Circle = = =/>
Rectangle
<Rectangle = = =/>
Polyline
<Polyline = = =/>
Polygon
<Polygon = = =/>
KmlLayer
<KmlLayer = = =/>
FusionTablesLayer
<FusionTablesLayer =/>
InfoWindow
<InfoWindow = = =/>
drawing/DrawingManager
<DrawingManager = =/>
places/SearchBox
<SearchBox ="Customized your placeholder" =/>
addons/MarkerClusterer
<MarkerClusterer = =/>
addons/InfoBox
<InfoBox = = =/>
async/withScriptjs
import withGoogleMap GoogleMap Marker from "react-google-maps";import withScriptjs from "react-google-maps/lib/async/withScriptjs"; // Wrap all `react-google-maps` components with `withGoogleMap` HOC// then wraps it into `withScriptjs` HOC// It loads Google Maps JavaScript API v3 for you asynchronously.// Name the component AsyncGettingStartedExampleGoogleMapconst AsyncGettingStartedExampleGoogleMap = ;// Then, render it:;
Changelog
The changelog is automatically generated via conventional-changelog and can be found in project root as well as npm tarball.