
Description
google-map-react is a React library that lets you render ordinary React components on top of a Google Map. It is a component written over a small part of the Google Maps API, so each child you place inside the map can be any React component, and a child that has lat and lng props is positioned at that point on the map. The library is isomorphic, which means it can render on a server, and it can draw map components in the browser even when the Google Maps API has not yet loaded. Every object on the map can be hovered, using an internal hover algorithm that you can tune, which allows interfaces such as a map with a table that highlights markers as you move through rows. The README covers getting started with a simple example, and it has a troubleshooting note for the common case where the map does not appear, which is usually a container with no width or height. The README has an installation section. The repository is on GitHub under the google-map-react organisation, where you can find the examples and report issues. The library is aimed at React developers who need custom markers or overlays on Google Maps, rather than plain map pins.…
Highlights
- Renders any React component on a Google Map
- Server rendering support
- Tunable hover on every map object
- Positions children by lat and lng props
Ratings & Reviews
No ratings yet
Be the first to rate google-map-react.
People also visit

google-maps-react-markers
Google Maps library that accepts markers as react components, works
google-map-react FAQ
What is google-map-react?
It is a React component that renders your own React components as markers and overlays on a Google Map.
How do I place a component on the map?
Add lat and lng props to any child of the GoogleMapReact component, and the child is shown at that position.
Can it render on the server?
Yes. The README says the library is isomorphic and can render on a server.
Why does my map not appear?
The README's first troubleshooting note is that the container element must have a width and height.
How do I install it?
Follow the installation and getting-started sections of the README.
What are the best google-map-react alternatives?
Popular alternatives to google-map-react include react-google-maps, google-map-react and @react-google-maps/api. See all google-map-react alternatives

















