Constructor Summary |
|---|
|
WMSAspect
(
newName
,
newURL
,
newSRS
,
newBounds
,
newLayers
,
newRows
,
newCols
,
newProjection
)
Create a WMSAspect object and initialize the grids and other information it contains.
|
Method Summary |
|---|
|
regrid
(
bnds
,
rows
,
cols
)
Return a regridded version of the aspect info.
|
|
getBounds
(
)
Return the bounds for the aspect
|
|
rowColToRS
(
row
,
col
,
r
,
s
)
Converts a row/col grid coordinate to R/S MapServer coordinates.
|
|
rsToRowCol
(
r
,
s
,
row
,
col
)
Converts R/S MapServer coordinates to a row/col in the grid
|
|
keepInBounds
(
newBnds
)
Ensures that the bounds object passed in remains within the Aspect's bounds
|
var asp = new WMSAspect('north', 'http://someURL', 'EPSG:3409',
{minx:-9036842.762,miny:-9036842.762,
maxx: 9036842.762,maxy: 9036842.762},
'blue_marble_01_circle,north_pole_geographic',
19, 19, projinfo);
// Creates a new aspect for the Northern Hemisphere, and
// using a 19x19 "grid" for potential underlying tiles.var newGrid = asp.regrid({minx:-903684.2762,miny:-903684.2762,
maxx: 903684.2762,maxy: 903684.2762},
1.9,1.9);
// A rough example, would create a grid reprenting a zoom of
// the center of the original bounds.var bnds = asp.getBounds();
// Returns the bounds object for the aspect
var status = asp.rowColToRS(9.5, 9.5, r, s);
// Converts the row/col values given. If using the example
// from the constructor, r[0] and s[0] should both be 0, as
// this is the center of the grid.
var status = asp.rowColToRS(0, 0, row, col);
// Converts the r/s values given. If using the example from
// the constructor, row[0] and col[0] should both be 9.5, as
// this is the center of the grid.
var bnds = {minx:-10000000,miny:-10000000,maxx: 0,maxy: 0});
asp.keepInBounds(bnds);
// Adjusts bnds so that the bounds values given are within the
// bounds set in the constructor.