O'Reilly logo

OpenLayers 2.10 by Erik Hazzard

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

Doing stuff with events

In Chapter 6, we introduced the notion of events and how OpenLayers uses events. At the core, there are essentially two types of events used by OpenLayers: Browser events and Map events. Browser events are things like clicking on the map div with your mouse, while Map events are things such as zooming the map to some coordinate. We worked a little bit with events in Chapter 6, so let's extend that knowledge and add even more custom functionality to our map.

Note

We won't go over browser events much, but the ideas behind them are essentially the same as map events. A great resource to find out more about browser events can be found at https://developer.mozilla.org/en/DOM/event.

Map event types

There are a number of supported ...

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