O'Reilly logo

OpenLayers 3 : Beginner's Guide by Erik Hazzard, Paul Spencer, Thomas Gratier

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

Understanding interactions and their architecture

Until now, we never inspected relations between interactions. So, it's time to examine ol.interaction.* classes. All the classes inherit from ol.interaction.Interaction, but compared to controls, it's less simple; you also have subclasses.

See the following diagram to grasp the relationships between the different interaction classes:

Understanding interactions and their architecture

An inspection of the above schema shows that every ol.interaction component inherits from ol.interaction.Interaction. In some cases, when an interaction uses a mouse, pen, or touchscreen, it will need to inherit from ol.interaction.Pointer, which deals with this use case. ...

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