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

Chapter 4. Working with Controls

In this chapter, we will cover:

  • Adding and removing controls
  • Changing the position of controls
  • Creating and adding a geolocation control
  • Creating a table of contents control for layers
  • Adding your own logo as a control

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

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