When showing a standard Google map, it comes with the default control set:
In addition to the default controls, Google Maps also has:
You can specify which controls to show when creating the map (inside MapOptions) or by calling setOptions() to change the map's options.
You may instead wish to turn off the default controls.
To do so, set the Map's disableDefaultUI property (within the Map options object) to true:
var mapOptions {disableDefaultUI: true}
Some controls appear on the map by default; while others will not appear unless you set them.
Adding or removing controls from the map is specified in the Map options object.
Set the control to true to make it visible - Set the control to false to hide it.
The following example turns "on" all controls:
var mapOptions {
panControl: true,
zoomControl: true,
mapTypeControl: true,
scaleControl: true,
streetViewControl: true,
overviewMapControl: true,
rotateControl: true
}
Several of the map controls are configurable.
The controls can be modified by specifying control options fields.
For example, options for modifying a Zoom control are specified in the zoomControlOptions field. The zoomControlOptions field may contain:
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.SMALL
}
Note: If you modify a control, always enable the control first (set it to true).
Another configurable control is the MapType control.
Options for modifying a control are specified in the mapTypeControlOptions field. The mapTypeControlOptions field may contain::
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
}
You can also position a control, with the ControlPosition property:
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU,
position: google.maps.ControlPosition.TOP_CENTER
}