[OpenLayers-Users] scaleline breaks zoom - bad .css? - advice sought

geep999 geep999 at yahoo.co.uk
Wed May 16 07:55:48 PDT 2012


I have two maps - identical except that one has a scaleline.
http://pgg999.co.uk/gpx/with_scaleline.html
http://pgg999.co.uk/gpx/with_scaleline.html 
http://pgg999.co.uk/gpx/without_scaleline.html
http://pgg999.co.uk/gpx/without_scaleline.html 

The scaleline breaks the zoom and navigation, but only when I position it at
the top of the map
using a .css definition for .olControlScaleLine.

If I leave it in the default position (i.e. no .css for .olControlScaleLine)
then zoom and navigation
are OK, but I can't see the scaleline properly as the fixed Ordnance Survey
Logo gets in the way.
http://pgg999.co.uk/gpx/with_scaleline_default.html
http://pgg999.co.uk/gpx/with_scaleline_default.html 

Can anybody tell me how to move the scaleline without breaking the zoom and
navigation?
Ideally I'd like to use opacity too, to make it stand out better against the
map.

The scaleline code is:
var scaleline = new OpenLayers.Control.ScaleLine({
  bottomInUnits: "mi",
  });
map.addControl(scaleline); 

and the scaleline.css I used to move it is:
.olControlScaleLine {
    top:-62px;
    padding: 62px;
}

I'm using UK Ordnance Survey OpenSpace which is built on OpenLayers 2.8.

Cheers,
Peter

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/scaleline-breaks-zoom-bad-css-advice-sought-tp4975126.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list