EMS.Control.NorthArrow

A simple north arrow from an image.  This can be used stand alone or used within another control.

Default example

var arrow = new EMS.Control.NorthArrow();

Custom example

// Set a custom image, size and ALT text
var arrow = new EMS.Control.NorthArrow({
    image: "north.png",
    size: new OpenLayers.Size(26, 26),
    alt: "This be north, this way, follow me, I know where I am going"
})

Inherits from

Summary
EMS.Control.NorthArrowA simple north arrow from an image.
Properties
size{OpenLayers.Size} size in pixels, of the control itself.
position{Mixed} is either OpenLayers.Pixel or a EMS.Position.
image{String} is the image path.
alt{String} The alternative text used for the image.
Constructor
EMS.Control.NorthArrow
Functions
draw

Properties

size

{OpenLayers.Size} size in pixels, of the control itself.

position

{Mixed} is either OpenLayers.Pixel or a EMS.Position.  Defaults to top left.

image

{String} is the image path.  The image will be laid out vertically and horizontally centered in the control.

alt

{String} The alternative text used for the image.

Constructor

EMS.Control.NorthArrow

Parameters

options{Object} are the options to control.  Apart from the OpenLayers.Control options, this controls adds: size, image and alt.

Functions

draw

draw: function(px)

Parameters

px{OpenLayers.Pixel} is the optional top left corner to start drawing from.  Can be null.

Returns

{DOMElement} the overall wrapping div, ready to be inserted.

Instances of this class represent a width/height pair
This class represents a screen coordinate, in x and y coordinates
Enumeration of possible positions relative to the map.
draw: function(px)
Extention to the OpenLayers.Control that translates relative positions from EMS.Position.
Controls affect the display or behavior of the map.
Close