I am using OpenLayers 2.12. I have added an OpenLayers OverviewMap control. This overview map tool is located on the right side of the map panel by default. I would like it to be positioned on the left side instead (see image).
How can I achieve this?
Best Answer
The overview map layout is controlled by the theme style, you can change the default styles in
openlayers/theme/default/style.css
.Find following two style items:
Change the
right: 0
toleft: 0
, that is:EDIT:
For the overview map maximize button symbol, it is hard coded inside openlayers js library which use the image 'img/layer-switcher-maximize.png'. However, simply modifying this image (rotate 180 deg) is not a good idea because the layer switcher is also using the same image. I would suggest to create a new image (just rotate layer-siwtcher-maximize.png 180 deg to get the new image, or maybe you can create a new one) and rename it to 'overview-map-maximize.png', then change the code in
openlayers/lib/OpenLayers/Control/OverviewMap.js
. Change the following line:to:
The minimize button image is of no problem since it's symmetric.