What's New in the v3.22 Map Controls

Opting out of the new controls in v3.22 and v3.23

While using v3.22 or v.23 of the Google Maps JavaScript API, you can choose to use the earlier set of controls rather than the updated controls, by setting the controls style to 'azteca'. The following sample opts out of the updated controls, in effect giving you the v3.21 controls in the v3.22 or v.23 API. Note that you must set google.maps.controlStyle = 'azteca' before you initialize the map:

function initMap() {
  google.maps.controlStyle = 'azteca';
  var map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: -34.397, lng: 150.644},
    zoom: 8
  });
}

What's changed

Version 3.22 of the Google Maps JavaScript API introduces changes to the controls that allow users to interact with the map. In summary, the changes have the following effect:

  • The default position of some controls has changed.
  • The color and size of some controls has changed.
  • Some controls and control options are deprecated, and are no longer available in v3.22 of the API.
  • The functionality of most controls remains the same. Differences are detailed on this page.
  • The user experience is now consistent regardless of whether a map is using signed-in mode mode or not, and is also more consistent with the Google Maps website.

The changes affect the map and Street View, as described below.

Controls on the map

Default controls

The following two maps illustrate the default set of controls in v3.21 and v3.22 of the API. Further sections on this page provide more detail about each of the controls in turn.

Old (v3.21 and opt-out):
New (v3.22 default):

Map size

By default, all the controls disappear if the map is too small (200x200px). You can override this behavior by explicitly setting the control to be visible. See the developer's guide.

Zoom control

The Zoom control is now just a "+" and "-" button - there is no longer a slider. The default position of the Zoom control has changed from TOP_LEFT to RIGHT_BOTTOM.

Old (v3.21 and opt-out):
  • Options: You can choose a zoom style available in google.maps.ZoomControlStyle: DEFAULT, LARGE, or SMALL.
  • Appearance: Slider and "+" and "-" buttons when zoom style is LARGE.
  • Default position: TOP_LEFT
New (v3.22 default):
  • Options: google.maps.ZoomControlStyle is not available.
  • Appearance: Only "+" and "-" buttons.
  • Default position: RIGHT_BOTTOM.

Map Type control

The default position of the Map Type control has changed from TOP_RIGHT to TOP_LEFT.

Old (v3.21 and opt-out):
Default position: TOP_RIGHT
New (v3.22 default):
Default position: TOP_LEFT

Street View (Pegman) control

The Street View control's appearance and default position have changed.

Old (v3.21 and opt-out):
  • Appearance: Pegman is long and thin.
  • Default position: TOP_LEFT
New (v3.22 default):
  • Appearance: Pegman is shorter and wider.
  • Default position: RIGHT_BOTTOM.

Rotate control

The Rotate control is visible in satellite and hybrid modes when oblique (tilted) imagery is available on the map. The control's appearance and default position have changed.

Old (v3.21 and opt-out):
  • Appearance: The old Rotate control offers two visible options to change the bearing of the tilted imagery. The first option appears as a ring around the Pan control, allowing the user to change the bearing to north, west, south, or east. The second option is a curved arrow that does the same thing, but can move only in a clockwise direction.
  • Default position: TOP_LEFT
New (v3.22 default):
  • Appearance: The Rotate control appears as two visible controls that perform different functions. The first is a tilt button, allowing the user to tilt the imagery to a 45° angle. The second is a rotate button, allowing the user to change the bearing of the imagery when tilted.
  • Default position: RIGHT_BOTTOM.

Overview Map control (deprecated)

The Overview Map control is not available in v3.22 of the API.

Old (v3.21 and opt-out):
The Overview Map control is available, based on the setting of the overviewMapControl and overviewMapControlOptions properties in google.maps.MapOptions.
New (v3.22 default):
The Overview Map control is not available.

Pan control (deprecated)

The map's Pan control is not available in v3.22 of the API. To pan the view, users can click and drag, or swipe, the map.

Old (v3.21 and opt-out):
The Pan control is available, based on the setting of the panControl and panControlOptions properties in google.maps.MapOptions.
New (v3.22 default):
The Pan control is not available.

Controls on Street View

Default controls

The following two Street View panoramas illustrate the default set of controls in v3.21 and v3.22 of the API. Further sections on this page provide more detail about each of the controls in turn.

Old (v3.21 and opt-out):
New (v3.22 default):

Zoom control

The Zoom control on Street View is now just a "+" and "-" button - there is no longer a slider. The default position of the Zoom control has changed from TOP_LEFT to RIGHT_BOTTOM.

Old (v3.21 and opt-out):
  • Options: You can choose a zoom style available in google.maps.ZoomControlStyle: DEFAULT, LARGE, or SMALL.
  • Appearance: Slider and "+" and "-" buttons when zoom style is LARGE. The buttons are white with black text.
  • Default position: TOP_LEFT
New (v3.22 default):
  • Options: google.maps.ZoomControlStyle is not available.
  • Appearance: Only "+" and "-" buttons. The buttons are black with white text.
  • Default position: RIGHT_BOTTOM.

Address control

The background color of the Address control on Street View has changed from white to black. The new control offers users the option to view the address on Google Maps.

Old (v3.21 and opt-out):
  • Appearance: White background.
  • Behavior: The control simply displays the address.
New (v3.22 default):
  • Appearance: Black background.
  • Behavior: Clicking 'View on Google Maps' takes the user to the same Street View panorama on Google Maps. Clicking the marker takes the user to the location (latitude/longitude) of the Street View panorama on Google Maps.

Close control

The default position and the appearance of the Close control have changed. The control is now part of the Address control.

Old (v3.21 and opt-out):
  • Appearance: A button with a cross ("X") icon, displayed independently from the Address control.
  • Default position: TOP_RIGHT.
New (v3.22 default):
  • Appearance: A back arrow, displayed next to the Address control. The Close control is bundled with the Address control.
  • Default position: TOP_LEFT.

Full Screen control (new)

The Full Screen control is new in v3.22 of the API. It allows the user to open the Street View panorama in fullscreen mode.

Old (v3.21 and opt-out):
The Full Screen control is not available.
New (v3.22 default):
  • Options: The Full Screen control is available, based on the setting of the fullscreenControl and fullscreenControlOptions properties in google.maps.StreetViewPanoramaOptions.
  • Behavior: When the user clicks this control, Street View opens in fullscreen mode.
  • Default position: TOP_RIGHT.

Pan control

The default position and the appearance of the Pan control have changed on Street View panoramas.

Old (v3.21 and opt-out):
  • Appearance: A button with four arrows pointing up, down, left and right, and a circle around the button showing "N" to indicate North.
  • Default position: TOP_LEFT.
New (v3.22 default):
  • Appearance: A compass needle indicating the current heading of the Street View image, with the red end of the needle pointing North. Arrows on either side of the needle allow the user to turn 90° clockwise or anti-clockwise.
  • Default position: RIGHT_BOTTOM.

Send feedback about...

Google Maps APIs
Google Maps APIs