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

Creating a custom control

You may wonder "why do we need to learn that?"

Some points to explain this requirement are:

  • Reusing components instead of using a boilerplate each time
  • Correctly overlaying UI buttons on the top of the map, particularly for a full screen case
  • Unifying UI manipulation because based on the same parent class, for example, adding a control using the various Map class methods is more easy than managing OpenLayers 3 and non-OpenLayers 3 objects separately

Let's see how we can do it.

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