Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • OpenLayers 2.10 Beginner's Guide
  • Toc
  • feedback
OpenLayers 2.10 Beginner's Guide

OpenLayers 2.10 Beginner's Guide

4.2 (9)
close
OpenLayers 2.10 Beginner's Guide

OpenLayers 2.10 Beginner's Guide

4.2 (9)

Overview of this book

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

Chapter 6. Taking Control of Controls

So far, we've taken for granted that the map will move when we drag it. Or that we can just click a layer in the layer switcher and it will turn on or off. Or that we can zoom in and out. We haven't yet talked much about what actually is behind the map interaction or how it works.

Simply put, the OpenLayers Control class is what makes our maps interactive. There are many built in controls, each with their own unique functions. But, not only do you have a large number of pre-made controls at your disposal, you also have the ability to easily create your own controls.

In this chapter, we'll cover:

  • What controls are

  • Adding controls to a map

  • The Control class and its subclasses

  • Using panels to add controls outside of the map

  • Creating custom controls

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete