Book Image

OpenLayers 2.10 Beginner's Guide

Book Image

OpenLayers 2.10 Beginner's Guide

Overview of this book

Table of Contents (18 chapters)
OpenLayers 2.10
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

OpenLayers.Control subclasses


OpenLayers provides a lot of different types of controls, and an up to date list can always be found at http://dev.openlayers.org/docs/files/OpenLayers/Control-js.html. Some controls are deprecated, and should not be used, so we will not cover controls that will not be supported in OpenLayers version 3.0 or greater.

Some properties and functions of some controls are mainly for advanced users and are outside the scope of this book, so we won't cover them all. Some other controls are used in accordance only with the Vector Layer class—so we'll get to those in Chapter 9. However, that still leaves us a lot to cover here now, so let's get started!

OpenLayers.Control.ArgParser

As we mentioned earlier, this is a control added to the map by default. It is aptly named; it parses the arguments passed in via the URL. For example, when appending ?zoom=0&lat=0&lon=0&layers=B to the URL of your map, the ArgParser control will parse the variables (i.e., zoom=0, lat...