# Class: Map

## Map

#### new Map()

  The Map Component in the root component for the google maps library. It handles the interface between the google maps javascript api and the implementation of the other components.

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `api-key` | string | Required. The javascript api key from your google console.
  `mapOptions` | object | Optional. A google.maps.MapOptions object.

  `props`

  object

  ###### Properties

  Name | Type | Description
  --- | --- | ---
  `onMount` | function | callback(map, maps) Get's called right after the component is done it's initial render. (Key for triggering outside events that require google maps api to be instantiated.)
  `zoom` | number |
  `center` | google.maps.LatLngLiteral |

  `latLngBounds`

  object

  ###### Properties

  Name | Type | Description
  --- | --- | ---
  `sw` | google.maps.LatLngLiteral |
  `ne` | google.maps.LatLngLiteral |

  Source:
    - components/map.js, line 21

### Classes

InfoWindow
Marker
MarkerCluster

### Members

#### <static, constant> exports.ControlPosition

  Import these Map Control positions by `import {ControlPosition} from 'google-react-maps'`

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `BOTTOM_CENTER` | enum |
  `BOTTOM_LEFT` | enum |
  `BOTTOM_RIGHT` | enum |
  `LEFT_BOTTOM` | enum |
  `LEFT_CENTER` | enum |
  `LEFT_TOP` | enum |
  `RIGHT_BOTTOM` | enum |
  `RIGHT_CENTER` | enum |
  `RIGHT_TOP` | enum |
  `TOP_CENTER` | enum |
  `TOP_LEFT` | enum |
  `TOP_RIGHT` | enum |

  Source:
    - utils/utils.js, line 84

#### state

  ##### Properties:

  Name | Type | Description
  --- | --- | ---

  `state`

  object

  The Map component's internal state.

  ###### Properties

  Name | Type | Description
  --- | --- | ---
  `maps` | object | A google maps javascript api reference.
  `_div_id` | object | The div id of this map.

  Source:
    - components/map.js, line 48

### Methods

#### getGeocoder()

  Gets the instance of the geocoder tied to this google map.

  Source:
    - components/map.js, line 73

#### getGoogleMap()

  Gets the google maps instance created by `new maps.Map()` keyword.

  Source:
    - components/map.js, line 81

#### getGoogleMapsApi()

  Gets the google maps api reference from within the component. (Could be used to do google maps api stuff outside of the component)

  Source:
    - components/map.js, line 77

#### Search results