Displays a scale control on the screen showing the current scale.
var scale = new EMS.Control.Scale();
| EMS. | Displays a scale control on the screen showing the current scale. |
| Constants | |
| FONT | {String} font CSS definition. |
| Properties | |
| offset | {OpenLayers.Pixel} is the default offset from the edge of the map. |
| position | {Mixed} is either OpenLayers.Pixel or a EMS.Position. |
| Constructor | |
| EMS. | Constructs a new instance of the scalebar control. |
| Functions | |
| destroy | |
| draw | Constructs contents of the control. |
| update | Updates the width and displayed magnitude on the scale. |
{OpenLayers.Pixel} is the default offset from the edge of the map.
{Mixed} is either OpenLayers.Pixel or a EMS.Position. By default this is set to be the bottom left.
draw: function( px )
Constructs contents of the control.
| px | {Mixed} is either OpenLayers.Pixel or a EMS.Position is the position to draw the scale. |
{DOMElement} A reference to a div that represents this control.
destroy: function()
Constructs contents of the control.
draw: function( px )
Updates the width and displayed magnitude on the scale.
updateScale: function()