O'Reilly logo

OpenLayers Cookbook by Antonio Santiago Perez

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 5. Adding Controls

In this chapter we will cover:

  • Adding some visual controls
  • Adding the NavigationHistory control
  • Working with geolocation
  • Placing controls outside the map
  • Editing features on multiple vector layers
  • Modifying features
  • Measuring distances and areas
  • Getting feature information from a data source
  • Getting information from a WMS server

Introduction

This chapter explores from the basics, the most important and common controls that OpenLayers offers us as developers. Controls allow us to navigate through the map, play with layers, zoom in or out, perform actions such as editing features, measuring distances, and the like. In essence, controls allow us to interact.

The OpenLayers.Control class is the base class for all the controls and contains ...

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