WeeklyDad
WeeklyDad

Reputation: 317

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?

Upvotes: 2

Views: 1139

Answers (2)

WeeklyDad
WeeklyDad

Reputation: 317

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.

Upvotes: 4

luffymonkey
luffymonkey

Reputation: 50

Are you trying to access OpenLayers.js through net directly? or did you save it in your pc? Because i have found some glitches when accessing it through net. See if that helps. Cheers.

Upvotes: 0

Related Questions