Community Map Builder 27 Apr 2008

Class Extent

Object
   |
   +--Extent

class Extent

Defined in Extent.js


Field Summary
 Object fixedScale
          
 Object height
          
 Object id
          
 Object lr
          
 Object model
          
 Object size
          
 Object ul
          
 Object width
          
 Object zoomBy
          
 
Constructor Summary
Extent ( model, initialRes )
            A tool designed to handle geography calculations for widgets which render the model in 2D.
 
Method Summary
 Object centerAt(center, newres, limitExtent)
           Adjust the extent so that it is centered at given XY coordinate with given resolution.
 void checkBbox()
          
 void firstInit(extent, initialRes)
          
 Object getBbox()
           Returns the bounding box as stored in the model
 Object getCenter()
           Returns the XY center of this extent
 Object getFixedScale(res)
           When given a res, it recalculates it to match the zoomlevels, when present and returns a fixed scale.
 Object getPL(xy)
           Returns pixel/line coordinates for given XY projection coords
 Object getScale()
           Returns the map scale denominator for the current extent resolution
 Object getSize()
           Returns the window size as stored in the model
 Object getXY(pl)
           Returns XY coordinates for given pixel line coords w.r.t.
 void init(extent, initialRes)
           Initialization of the Extent tool, called as a loadModel event listener.
 void setBbox(bbox)
           Recalculates a given bbox and stores a proper aspect one in the model
 void setResolution(size)
           Adjust the resolution so the bbox fits in the specified width and height
 void setScale(scale)
           Sets the model's resolution from mapScale input value.
 void setSize(size)
           Stores a given window size in the model.
 void setZoomLevels(enabled,zoomLevels)
          
 void zoomToBox(ul, lr)
           Adjust the extent to the given bbox.

Field Detail

fixedScale

Object fixedScale

height

Object height

id

Object id

lr

Object lr

model

Object model

size

Object size

ul

Object ul

width

Object width

zoomBy

Object zoomBy

Constructor Detail

Extent

Extent( model, initialRes )

Method Detail

centerAt

Object centerAt(center, newres, limitExtent)

checkBbox

void checkBbox()

firstInit

void firstInit(extent, initialRes)

getBbox

Object getBbox()

getCenter

Object getCenter()

getFixedScale

Object getFixedScale(res)

getPL

Object getPL(xy)

getScale

Object getScale()

getSize

Object getSize()

getXY

Object getXY(pl)

init

void init(extent, initialRes)

setBbox

void setBbox(bbox)

setResolution

void setResolution(size)

setScale

void setScale(scale)

setSize

void setSize(size)

setZoomLevels

void setZoomLevels(enabled,zoomLevels)

zoomToBox

void zoomToBox(ul, lr)

Community Map Builder 27 Apr 2008

Documentation generated by JSDoc on Sun Apr 27 20:30:54 2008