react-minimal-google-maps

0.0.42 • Public • Published

Minimal React component for Google Maps

ES6, React v15.01

npm version npm MIT License

It enables to use all features of Google Maps API from parent component.

Demo

Features

It has only a few features on startup:

  • Passing markers as props
  • Passing initial position and zoom
  • Informing parent component when Google Maps API is ready

Getting started

Firstly

    npm install react-minimal-google-maps --save

Then

    import Map from 'react-minimal-google-maps'

and in render function use something like this:

    <Map
      initialZoom={5}
      initialCordinates={{lat: -34.397, lng: 150.644}}
      markers={this.state.markers}
      styles={{height: "500px"}}
      updateLoadState={this.handleLoadUpdate}
    />

See example

Readme

Keywords

Package Sidebar

Install

npm i react-minimal-google-maps

Weekly Downloads

3

Version

0.0.42

License

MIT

Last publish

Collaborators

  • kadash