index.js 771 Bytes
import React, { Component } from "react";
import { Map, GoogleApiWrapper, Marker  } from 'google-maps-react';
import './style.css';

const mapStyles = {
  width: '600px',
  height: '600px',
};

class Demo1 extends Component {
  constructor() {
    super();
    this.state = {
      name: "React"
    };
  }

  render() {
    return (
     <div class="map"> 
        <Map
          google={this.props.google}
          zoom={14}
          style={mapStyles}
          initialCenter={{
           lat: '37.5905144',
            lng: '127.0576477'
          }}
        >
        <Marker
          onClick={this.onMarkerClick}
        />
        </Map>
      </div>
    );
  }
}

export default GoogleApiWrapper({
  apiKey: 'AIzaSyAguo3zH8vWZJbzXEqyp8D8UvnBh3zX8rQ'
})(Demo1);