EMS.Bounds

Drop-in replacement for OpenLayers.Bounds that automatically converts to the EMS.Projection.SPHERICAL_MERCATOR projection.

Inherits from

Summary
EMS.BoundsDrop-in replacement for OpenLayers.Bounds that automatically converts to the EMS.Projection.SPHERICAL_MERCATOR projection.
Constructor
EMS.Bounds
Constants
EMS.Bounds.WORLD{OpenLayers.Bounds} The bounds of the world in Spherical Mercator.
EMS.Bounds.AUSTRALIA{OpenLayers.Bounds} The bounds of Australia in Spherical Mercator.

Constructor

EMS.Bounds

Examples

// Construct with separate arguments
var one = new EMS.Bounds(144.2231, -38.8833, 144.32882, -37.5388);

// Construct via two points
var two = new EMS.Bounds({lon: 144.2231, lat: -38.8833}, {lon: 144.32882, lat: -37.5388});

// Construct via an object
var three = new EMS.Bounds({left: 144.2231, bottom: -38.8833, right: 144.32882, top: -37.5388});

// Construct via an array
var four = new EMS.Bounds([144.2231, -38.8833, 144.32882, -37.5388]);

// Copy construction
var five = new EMS.Bounds(four);

Parameters

bounds{Mixed} This maybe four separate arguments representing the left, bottom, right and top values, two objects or EMS.LonLat objects representing two of the corners of the bounds, an array with the indexes in order of left, bottom, right and top, an object with left, bottom, right and top as properties, or an EMS.Bounds to copy.

Constants

EMS.Bounds.WORLD

{OpenLayers.Bounds} The bounds of the world in Spherical Mercator.

EMS.Bounds.AUSTRALIA

{OpenLayers.Bounds} The bounds of Australia in Spherical Mercator.

Instances of this class represent bounding boxes.
Spherical mercator in metres.
Drop-in replacement for OpenLayers.LonLat that automatically converts to the EMS.Projection.SPHERICAL_MERCATOR projection.
Close