|
Community Map Builder 21 Aug 2007 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--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 |
Object fixedScale
Object height
Object id
Object lr
Object model
Object size
Object ul
Object width
Object zoomBy
| Constructor Detail |
Extent( model, initialRes )
model - the model document that this extent represents
initialRes - (optional) if supplied the extent resolution will be set to this value
| Method Detail |
Object centerAt(center, newres, limitExtent)
center - projection XY coordinate to center at
newres - resolution to display at
limitExtent - ensure that the extent doesn't go beyond available bbox (TBD: not complete/tested)
void checkBbox()
void firstInit(extent, initialRes)
Object getBbox()
Object getCenter()
Object getFixedScale(res)
res - optional resolution to be checked
Object getPL(xy)
xy - projection XY coordinate to calculate
Object getScale()
Object getSize()
Object getXY(pl)
pl - pixel line in extent to calculate
void init(extent, initialRes)
extent - the object being initialized
initialRes - (optional) if supplied the extent resolution will be set to this value
void setBbox(bbox)
bbox - an array with a bounding box
void setResolution(size)
size - width, height array passed in
void setScale(scale)
scale - map scale denominator value
void setSize(size)
size - an array with a window size
void setZoomLevels(enabled,zoomLevels)
void zoomToBox(ul, lr)
ul - upper left coordinate of bbox in XY projection coords
lr - lower right coordinate of bbox in XY projection coords
|
Community Map Builder 21 Aug 2007 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||