Constructor Summary |
|---|
|
WMSMapCanvas
(
container
,
canvasWidth
,
canvasHeight
,
inputGrid
)
Creates a new WMSMapCanvas object and sets it up.
|
Method Summary |
|---|
|
addAspect
(
newAspect
)
Attaches a new aspect to the object
|
|
changeAspect
(
aspectName
)
Changes the current aspect to view another one
|
|
changeDblClickMode
(
newMode
)
Changes the action that happens when a double-click is done on the Canvas
|
|
changeZoomFactor
(
newFactor
)
Changes the zoom factor used for double-click events
|
|
zoom
(
zoomtype
,
param
)
Applies a zoom to the current map.
|
|
pan
(
xdir
,
ydir
)
Pans the map.
|
|
loadWMSImage
(
)
Causes the map image to be loaded from the Map Server
|
|
setXYFromRSPolgyon
(
polygon
)
Sets the XY box based on an RS Polygon.
|
|
getMoreMousePosInfo
(
fullpoint
)
Fills in map R/S information to the Mouse Position listener information
|
|
getMoreBoxInfo
(
boxinfo
)
Fills in R/S information to the box returned by Row/Col listeners
|
|
adjustGrid
(
bnds
)
Adjusts the current grid based on the bounds passed in.
|
new wms = new WMSMapCanvas(somediv, 500, 500, null);
// Creates a new WMSMapCanvas object that is 500x500 pixels,
// and will display it in somediv.
var asp = new WMSAspect(...); // Create the aspect
wms.addAspect(asp); // Attach it to the MapCanvas
wms.changeAspect("north");
// Will change to the aspect named "north"wms.changeDblClickMode('ZOOMIN');
// Will change the Double Click mode to zoom in when double-
// clickedwms.changeZoomFactor(3);
// Will change the zoom factor to 3x
wms.zoom('in_center');
// Will zoom in at the center of the image, using the current
// Zoom factorwms.pan(1,-1); // Shift the map down and to the right
wms.loadWMSImage(); // reloads the map image
wms.setXYFromRSPolygon(new Array(-10,10,-10,-5,5,-5,5,10,-10,10));
// sets the XY box based on the coordinates set
this.getMoreMousePosInfo(infopoint);
// Called within the class to pass more point info
this.getMoreBoxInfo(infobox);
// Called within the class to pass more box info
this.adjustGrid(newBnds); // will adjust the grid