Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 577 Bytes

File metadata and controls

31 lines (26 loc) · 577 Bytes

Props

  • containerElement: ReactElement
  • mapElement: ReactElement
  • googleMapSettings: Settings object for Google Map

Usage

import {
  withGoogleMap,
  GoogleMap,
  Marker,
} from "react-google-maps";

const MapWithAMarker = withGoogleMap(props =>
  <GoogleMap
    defaultZoom={8}
    defaultCenter={{ lat: -34.397, lng: 150.644 }}
  >
    <Marker
      position={{ lat: -34.397, lng: 150.644 }}
    />
  </GoogleMap>
);

<MapWithAMarker
  containerElement={<div style={{ height: `400px` }} />}
  mapElement={<div style={{ height: `100%` }} />}
/>