Introduction
This chapter covers the controls that are found in the Google Maps JavaScript API. Generally speaking, controls are UI elements that interact with the user. At a very basic level, they comprise of simple HTML elements or a combination of them.
Controls enable the user to pan the map, zoom in or out, measure distances or areas, and so on. Complex controls involve the administration of multiple overlay layers (introduced in Chapter 2, Adding Raster Layers) in the form of a table of contents (ToC) control, or an editing toolbar for drawing vector features.
The Google Maps JavaScript API presents developers with the opportunity to use and customize built-in controls as well as build custom controls from the ground up.
This chapter will first focus on dealing with built-in controls and their configurations in detail, including the customization of the UI. Then, creating custom controls from very basic to complex ones (such as ToCs) will be covered.