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

Time for action – playing with zoom button and map copyrights

What we are customizing are the controls introduced in Chapter 9, Taking Control of Controls. It's time to try it: practicing things on your own will improve your comprehension. For this, we will reuse the OpenStreetMap example from Chapter 1, Getting Started with OpenLayers, and customize the position for zoom buttons and map copyrights.

  1. In the Sources panel, open the ol.css file and use the Format button to make it more readable as this file is a .css minified file on one line.
  2. Find the.ol-zoom class in the ol.css file.
  3. Replace the left : 0.5em; parameter with right : 0.5em; to make changes to zoom buttons.
  4. Now, it's time to change copyrights. So, like in the previous case, look for the ...

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