Skip to content

kaadash/react-minimal-google-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Minimal google maps component for react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published