Search code examples
openlayers

OpenLayers ScaleLine not showing properly


I have a minor problem with my ScaleLine, the code isnt more then

this.scaleline = new OpenLayers.Control.ScaleLine();
map.addControl(this.scaleline);

And this should show everything just fine, as long as you initate it where the map is being initated (I have tried placing it at different places, but same result).

All I do get is ScaleLine

And its logic works just fine, and when I read OpenLayers, thats all you need to have it fully working.

What Im missing, is the "line" between the numbers and around (to make it look like a scale). Any suggestions?


Solution

  • I solved this issue, I totally forgot that in default/theme there's a css which does some magic for the scaleLine.

    So I figured I write it here and now, incase someone else forgets about the default CSS.