{"size": 1339, "ext": "js", "max_stars_repo_path": "client/src/components/Map/GoogleMap.js", "max_stars_repo_name": "tomekregulski/fieldist", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/components/Map/GoogleMap.js", "max_issues_repo_name": "tomekregulski/fieldist", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/components/Map/GoogleMap.js", "max_forks_repo_name": "tomekregulski/fieldist", "max_forks_repo_forks_event_min_datetime": "2021-07-16T00:22:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-16T02:05:37.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 23.4912280702, "max_line_length": 67, "alphanum_fraction": 0.5242718447}
import React, { Component } from 'react';
import { Map, Marker, GoogleApiWrapper } from 'google-maps-react';

const containerStyle = {
  position: 'relative',
  width: '100%',
  height: '10rem',
};

const mapStyles = {
  width: '100%',
  height: '100%',
};

export class GoogleMap extends Component {
  render() {
    // console.log(
    //   'lat:',
    //   this.props.venue.geometry.lat,
    //   'lng:',
    //   this.props.venue.geometry.lng
    // );
    // console.log('lat:', this.props.lat, 'lng:', this.props.lng);
    return (
      <div>
        <Map
          containerStyle={containerStyle}
          style={mapStyles}
          google={this.props.google}
          zoom={9}
          initialCenter={{
            lat: this.props.lat,
            lng: this.props.lng,
          }}
        >
          <Marker
            name={'Current location'}
            position={{ lat: this.props.lat, lng: this.props.lng }}
          />
          <Marker
            name={this.props.venue.name}
            title={this.props.venue.name}
            position={{
              lat: this.props.venue.geometry.lat,
              lng: this.props.venue.geometry.lng,
            }}
          />
        </Map>
      </div>
    );
  }
}

export default GoogleApiWrapper({
  apiKey: 'AIzaSyDlXBmR1YPuedZSvjL1Jxbk6OuSmuILHsE',
})(GoogleMap);
