Display a small line indicator representing the current map scale on the map.
| OpenLayers. Control. ScaleLine | Display a small line indicator representing the current map scale on the map. |
| Properties | |
| maxWidth | {Integer} Maximum width of the scale line in pixels. |
| topOutUnits | {String} Units for zoomed out on top bar. |
| topInUnits | {String} Units for zoomed in on top bar. |
| bottomOutUnits | {String} Units for zoomed out on bottom bar. |
| bottomInUnits | {String} Units for zoomed in on bottom bar. |
| eTop | {DOMElement} |
| eBottom | {DOMElement} |
| Constructor | |
| OpenLayers. ScaleLine | Create a new scale line control. |
| Functions | |
| draw | {DOMElement} |
| getBarLen | Given a number, round it down to the nearest 1,2,5 times a power of 10. |
| update | Update the size of the bars, and the labels they contain. |
{DOMElement}
draw: function()
Given a number, round it down to the nearest 1,2,5 times a power of 10.
getBarLen: function( maxLen )
Update the size of the bars, and the labels they contain.
update: function()