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 class


As we saw in the previous example, there are quite a few controls available to us. The Control class is similar in nature to the Layer class—there is a base Control class which all other control subclasses inherit from. Because most controls provide completely different functionality from one another, the base Control class does not contain a lot of properties.

The official, up to date documentation for this class can be found at http://dev.openlayers.org/docs/files/OpenLayers/Control-js.html.

OpenLayers.Control properties

Like properties of other classes, you can specify these properties when instantiating your control object. There are a few properties of the base OpenLayers.Control class, which are inherited by all other Control classes:

Name

Type

Description

autoActivate

{Boolean}

Set the control to activate when added to the map. Default value is false.

div

{HTML Element}

Many controls support the ability to be placed in a div outside the map. (This...