Control Positioning

Learn how to change control element placement on the map.

Change the control position

To change the position of most controls on the map, we will modify the position property within the MapOptions object using google.maps.ControlPosition. Here’s an example of position the zoom control to the top-center of the map:

new google.maps.Map(document.getElementById("map"), {
        ...
	zoomControlOptions: {
		position: google.maps.ControlPosition.TOP_CENTER,
	},
});

The position property doesn’t fix the location of the control. Instead, it intelligently positions the control around existing control elements.

Supported control positions

The following control positions are supported by the Google Maps API:

Get hands-on with 1200+ tech skills courses.