EMS.Control.Scale

Displays a scale control on the screen showing the current scale.

Example

var scale = new EMS.Control.Scale();

Inherits from

Summary
EMS.Control.ScaleDisplays 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.Control.ScaleConstructs a new instance of the scalebar control.
Functions
destroy
drawConstructs contents of the control.
updateUpdates the width and displayed magnitude on the 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.  By default this is set to be the bottom left.

Constructor

EMS.Control.Scale

Constructs a new instance of the scalebar control.

Parameters

options{Object} Extra options to override existing properties or add new ones.

Functions

destroy

destroy: function()

draw

draw: function(px)

Constructs contents of the control.

Parameters

px{Mixed} is either OpenLayers.Pixel or a EMS.Position is the position to draw the scale.

Returns

{DOMElement} A reference to a div that represents this control.

update

updateScale: function()

Updates the width and displayed magnitude on the scale.

This class represents a screen coordinate, in x and y coordinates
Enumeration of possible positions relative to the map.
destroy: function()
draw: function(px)
Constructs contents of the control.
updateScale: function()
Updates the width and displayed magnitude on the scale.
Extention to the OpenLayers.Control that translates relative positions from EMS.Position.
Close