Easy Tutorial
❮ Home Ref Mapoptions ❯

Google Maps Control Options


Default Control Options for Google Maps:


Google Maps - Default Control Options:

When using a standard Google Map, its default settings include:


Google Maps - Additional Control Options

In addition to the default control options, Google also offers:

You can specify which control options to display when creating a map by setting options or by calling setOptions() to change the map's settings.


Google Maps - Disabling Default Control Options

You may want to disable the default control options.

To disable the default control options, set the map's disableDefaultUI property to true:

Example


Google Maps - Enabling All Control Options

Some control options are displayed by default on the map, while others are not unless you set them.

Set controls to true to make them visible - set controls to false to hide them.

The following example enables all controls:

Example


Google Maps - Modifying Control Options

Some map controls are configurable. Change control options by specifying control option fields.

For example, modify the Zoom control options in zoomControlOptions. zoomControlOptions includes the following three options:

Example

Note: If you need to modify a control, first enable the control (set it to true).

Another control is the MapType control.

The MapType control can be displayed as one of the following style options:

Example

Similarly, you can use the ControlPosition property to specify the position of controls:

Example


Google Maps - Custom Control Options

Create a custom control that returns to London on click event (if the map is dragged):

Example


Google Maps - Control Options Reference Manual

Google Maps API Reference Manual.

❮ Home Ref Mapoptions ❯