O'Reilly logo

Google Maps JavaScript API Cookbook by Balkan Uraz, Alper Dincer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding and removing controls

The Google Maps default UI has several controls that are displayed by default or if certain conditions are met. These include:

  • Zoom control
  • Pan control
  • MapType control
  • Scale control
  • Street View control
  • Rotate control
  • Overview Map control

The Google Maps JavaScript API presents the opportunity for developers to opt in or out of these controls or customize them in terms of functionality or look.

In this recipe, we will cover ways to alter the UI by adding or removing built-in controls and how to change their properties through presented options.

Getting ready

The first recipe of Chapter 1, Google Maps JavaScript API Basics, will do our work. We will alter it for this recipe.

How to do it…

You will opt for the appearance of the built-in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required