Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-googlemaps

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-googlemaps

A declarative React interface to Google Maps

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
decreased by-16%
Maintainers
2
Weekly downloads
 
Created
Source

React Google Maps Build Status

A declarative React interface to Google Maps.

Check it out:

Important Notes

This is an alpha release. The API and organizational structure are subject to change. Comments and contributions are much appreciated.

Installation

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.

Usage

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.

License

Licensed under MIT. Full license here »

Keywords

FAQs

Package last updated on 11 Jan 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc