How to get openlayers 3 zoom control to show up on right side?
Asked Answered
M

2

14

By default the openlayers 3 zoom controls are on the top left. How can I move it to the top right? The API appears to return a broken link when going into options.

Mirellamirelle answered 27/12, 2013 at 22:23 Comment(0)
D
7

Using casading style sheets.

.ol-zoom {
   right: 8px
}
Daphene answered 2/1, 2014 at 17:21 Comment(2)
Me too. "left: unset;" actually. Please edit your answer.Chiaki
Also had to use left: auto as unset would not work in IE 11.Senhor
C
17

Use cascading style sheets. You need to unset the previous "left" value.

  .ol-zoom {
     left: unset;
     right: 8px;
  }
Chiaki answered 19/5, 2016 at 14:15 Comment(2)
unset leads to a strange effect in IE 11. I would rather use auto.Senhor
use left: auto instead of left: unset, works fine in IE11Roxanaroxane
D
7

Using casading style sheets.

.ol-zoom {
   right: 8px
}
Daphene answered 2/1, 2014 at 17:21 Comment(2)
Me too. "left: unset;" actually. Please edit your answer.Chiaki
Also had to use left: auto as unset would not work in IE 11.Senhor

© 2022 - 2024 — McMap. All rights reserved.