Map API MapOptions Object
Example
Specify the attributes/options of the map:
Definition and Usage
The MapOptions object holds the initialization variables/options for the map.
Syntax
Properties of MapOptions
| Property | Type | Description |
|---|---|---|
| backgroundColor | string | Specifies the background color for the Map <div>. |
| center | LatLng | Required. Specifies the default center of the map. |
| disableDefaultUI | boolean | Enables/disables all default controls. |
| disableDoubleClickZoom | boolean | Enables/disables zooming and centering on double-click. |
| draggable | boolean | When set to False, prevents the map from being dragged. Default is True. |
| draggableCursor | string | Specifies the name/URL of the cursor to display over draggable objects. |
| draggingCursor | string | Specifies the name/URL of the cursor to display when dragging an object. |
| heading | number | Specifies the heading in degrees for aerial imagery. |
| keyboardShortcuts | boolean | When set to False, prevents the map from being controlled by the keyboard. Default is True. |
| mapMaker | boolean | Set to True if you want to use Map Maker tiles instead of regular tiles. |
| mapTypeControl | boolean | Specifies the default enabled/disabled state of the Map type control. |
| mapTypeControlOptions | MapTypeControlOptions | Default display options for the Map type control. |
| mapTypeId | MapTypeId | Required. Default map type. |
| maxZoom | number | Maximum zoom level of the map. |
| minZoom | number | Minimum zoom level of the map. |
| noClear | boolean | If set to True, does not clear the contents of the Map <div>. |
| overviewMapControl | boolean | Enabled/disabled state of the Overview Map control. |
| overviewMapControlOptions | OverviewMapControlOptions | Display options for the Overview Map control. |
| panControl | boolean | Enabled/disabled state of the Pan control. |
| panControlOptions | PanControlOptions | Display options for the Pan control. |
| rotateControl | boolean | Enabled/disabled state of the Rotate control. |
| rotateControlOptions | RotateControlOptions | Display options for the Rotate control. |
| scaleControl | boolean | Default enabled/disabled state of the Scale control. |
| scaleControlOptions | ScaleControlOptions | Default display options for the Scale control. |
| scrollwheel | boolean | When set to False, disables zooming on the map with the scroll wheel. Default is True. |
| streetView | StreetViewPanorama | The StreetViewPanorama to display when the map's Street View pegman is dropped. |
| streetViewControl | boolean | Default enabled/disabled state of the Street View Pegman control. |
| streetViewControlOptions | StreetViewControlOptions | Default display options for the Street View Pegman control. |
| styles | Array.<MapStyleType> | Styles to apply to each of the default map types. |
| tilt | number | The angle of incidence of the map measured in degrees from the viewport plane to the map plane (0 and 45). |
| zoom | number | Required. Default zoom level of the Map. |
| zoomControl | boolean | Enabled/disabled state of the Zoom control. |
| zoomControlOptions | ZoomControlOptions | Display options for the Zoom control. |