
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
react-googlemaps
Advanced tools
A declarative React interface to Google Maps.
Check it out:
This is an alpha release. The API and organizational structure are subject to change. Comments and contributions are much appreciated.
npm install react-googlemaps --save
This library is written with CommonJS modules. If you are using browserify, webpack, or similar, you can consume it like anything else installed from npm.
var React = require('react');
var ReactGoogleMaps = require('react-googlemaps');
var GoogleMapsAPI = window.google.maps;
var Map = ReactGoogleMaps.Map;
var Marker = ReactGoogleMaps.Marker;
var OverlayView = ReactGoogleMaps.OverlayView;
function handleClick(e) {
console.log('Clicked at position', e.latLng);
}
React.render(
<Map
initialZoom={10}
initialCenter={new GoogleMapsAPI.LatLng(-41.2864, 174.7762)}>
<Marker
onClick={handleClick}
position={new GoogleMapsAPI.LatLng(-41.2864, 174.7762)} />
<OverlayView
style={{backgroundColor: '#fff'}}
position={new GoogleMapsAPI.LatLng(-41.2864, 174.7762)}>
<p>Some content</p>
</OverlayView>
</Map>,
mountNode
);
Checkout the API docs or the examples directory for more detailed usage.
Licensed under MIT. Full license here »
0.4.0
FAQs
A declarative React interface to Google Maps
We found that react-googlemaps demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.