You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Maps JavaScript API

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Maps JavaScript API and related services
  3. Create appropriate keys
Continue

Controls

FullscreenControlOptions interface

google.maps.FullscreenControlOptions interface

Options for the rendering of the fullscreen control.

Properties
position
Position id. Used to specify the position of the control on the map. The default position is RIGHT_TOP.

MapTypeControlOptions interface

google.maps.MapTypeControlOptions interface

Options for the rendering of the map type control.

Properties
mapTypeIds
Type:  Array<MapTypeId|string>
IDs of map types to show in the control.
position
Position id. Used to specify the position of the control on the map. The default position is TOP_RIGHT.
style
Style id. Used to select what style of map type control to display.

MapTypeControlStyle constants

google.maps.MapTypeControlStyle constants

Identifiers for common MapTypesControls.

Constants
DEFAULT Uses the default map type control. When the DEFAULT control is shown, it will vary according to window size and other factors. The DEFAULT control may change in future versions of the API.
DROPDOWN_MENU A dropdown menu for the screen realestate conscious.
HORIZONTAL_BAR The standard horizontal radio buttons bar.

MotionTrackingControlOptions interface

google.maps.MotionTrackingControlOptions interface

Options for the rendering of the motion tracking control.

Properties
position
Position id. This is used to specify the position of this control on the panorama. The default position is RIGHT_BOTTOM.

PanControlOptions interface

google.maps.PanControlOptions interface

Options for the rendering of the pan control.

Properties
position
Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.

RotateControlOptions interface

google.maps.RotateControlOptions interface

Options for the rendering of the rotate control.

Properties
position
Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.

ScaleControlOptions interface

google.maps.ScaleControlOptions interface

Options for the rendering of the scale control.

Properties
style
Style id. Used to select what style of scale control to display.

ScaleControlStyle constants

google.maps.ScaleControlStyle constants

Identifiers for scale control ids.

Constants
DEFAULT The standard scale control.

StreetViewControlOptions interface

google.maps.StreetViewControlOptions interface

Options for the rendering of the Street View pegman control on the map.

Properties
position
Position id. Used to specify the position of the control on the map. The default position is embedded within the navigation (zoom and pan) controls. If this position is empty or the same as that specified in the zoomControlOptions or panControlOptions, the Street View control will be displayed as part of the navigation controls. Otherwise, it will be displayed separately.

ZoomControlOptions interface

google.maps.ZoomControlOptions interface

Options for the rendering of the zoom control.

Properties
position
Position id. Used to specify the position of the control on the map. The default position is TOP_LEFT.

ControlPosition constants

google.maps.ControlPosition constants

Identifiers used to specify the placement of controls on the map. Controls are positioned relative to other controls in the same layout position. Controls that are added first are positioned closer to the edge of the map.
  +----------------+
  + TL    TC    TR +
  + LT          RT +
  +                +
  + LC          RC +
  +                +
  + LB          RB +
  + BL    BC    BR +
  +----------------+
Elements in the top or bottom row flow towards the middle of the row. Elements in the left or right column flow towards the middle of the column.

Constants
BOTTOM_CENTER Elements are positioned in the center of the bottom row.
BOTTOM_LEFT Elements are positioned in the bottom left and flow towards the middle. Elements are positioned to the right of the Google logo.
BOTTOM_RIGHT Elements are positioned in the bottom right and flow towards the middle. Elements are positioned to the left of the copyrights.
LEFT_BOTTOM Elements are positioned on the left, above bottom-left elements, and flow upwards.
LEFT_CENTER Elements are positioned in the center of the left side.
LEFT_TOP Elements are positioned on the left, below top-left elements, and flow downwards.
RIGHT_BOTTOM Elements are positioned on the right, above bottom-right elements, and flow upwards.
RIGHT_CENTER Elements are positioned in the center of the right side.
RIGHT_TOP Elements are positioned on the right, below top-right elements, and flow downwards.
TOP_CENTER Elements are positioned in the center of the top row.
TOP_LEFT Elements are positioned in the top left and flow towards the middle.
TOP_RIGHT Elements are positioned in the top right and flow towards the middle.

Send feedback about...

Google Maps JavaScript API
Google Maps JavaScript API
Need help? Visit our support page.