react-minimal-google-maps
v0.0.42
Published
React minimal google maps component
Downloads
38
Readme
Minimal React component for Google Maps
ES6, React v15.01
It enables to use all features of Google Maps API from parent component.
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