Chameleon    Home  |  Docs  |  Support  |  Bugs  |  CVS  |  Downloads 

MapTools.org

intro text, put a nice little paragraph in here that describes this document (or Fred says 2)

Index

CWC Widgets

CWC2 Attribute Groups

Base Attributes

These attributes are common to all widgets.
TYPE
The type of the widget indicates the actual widget object to create for this tag.
VISIBLE
Make the widget visible or not in the page, by default this is true for all widgets.
ENABLED
Enable or disable the widget in the interface (not currently supported, always true).

Label Attributes

These attributes are appropriate for widgets that display a label, for instance, next to an icon.
LABEL
The text to display in this label.
LABELPOSITION
The position of the label around another widget. Position 0 is upper-left. Positions increase clockwise to position 8 which is left of the widget. Default is 8.
LABELHALIGN
The horizontal alignment of the label, default is left.
LABELVALIGN
The vertical alignment of this label. The default is middle.
LABELCLASS
The CSS class to control the rendering of this label. The default is CWCLabelWidgetClass.
LABELSTYLE
The CSS style to apply to this label. The default is no style.

Icon Attributes

These attributes are appropriate for widgets that display an icon. If the icon is clickable, the widget should implement javascript functions to swap the image to the selected version if available.
IMAGE
The image to display for this icon.
IMAGEWIDTH
The width in pixels of this image.
IMAGEHEIGHT
The height in pixels of this image.
IMAGETIP
The alternate or tooltip text to display for this image.
IMAGECLASS
The CSS class to control the rendering of this image. The default is no class.
IMAGESTYLE
A CSS style to apply to this image tag. The default is no style.

Button Attributes

These attributes are appropriate for widgets that display buttons.
TOOLSET
A name indicating a logical group of tools of which only one can be selected.
IMAGESELECTED
The image to display when this button is selected.
IMAGEHOVER
The image to display when the mouse hovers over this button.

Popup Attributes

These attributes are appropriate for widgets that popup a window, for instance, legend popup.
POPUPWIDTH
Sets the width in pixels of a popup window.
POPUPHEIGHT
Sets the height in pixels of a popup window.
TOOLBAR
Controls the display of a toolbar in a popup window. The default is true.
MENUBAR
Controls the display of a menubar in a popup window. The default is true.
STATUS
Controls the display of a status bar in a popup window. The default is true.
SCROLLBARS
Controls the display of scrollbars in a popup window. The default is true.
RESIZABLE
Controls if a popup window is resizable or not. The default is true.

Text Button Attributes

These attributes are appropriate for widgets that display a dynamically generated button.
TEXTBUTTONCOLOR
The color to fill the background of the text button with.
TEXTBUTTONBACKGROUNDIMAGE
An image to render as the background of the button. The background image is rendered on top of the background color.
TEXTBUTTONBORDER_TOPLEFT_IMAGE
The image to use as the top left corner of the text button.
TEXTBUTTONBORDER_TOP_IMAGE
The image to use as the top edge of the button.
TEXTBUTTONBORDER_TOPRIGHT_IMAGE
The image to use as the top right corner of the text button.
TEXTBUTTONBORDER_RIGHT_IMAGE
The image to use as the right edge of the text button.
TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE
The image to use as the bottom right corner of the text button.
TEXTBUTTONBORDER_BOTTOM_IMAGE
The image to use as the bottom edge of the text button.
TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE
The image to use as the bottom left corner of the text button.
TEXTBUTTONBORDER_LEFT_IMAGE
The image to use as the left edge of the text button
TEXTBUTTONWIDTH
The overall width of the text button in pixels.
TEXTBUTTONHEIGHT
The overall height of the text button in pixels.
TEXTBUTTONPADDING
The amount of space to leave between the image and the label in pixels.
TEXTBUTTONNUDGE
The amount of vertical adjustment in pixels to apply to the label's vertical placement. The label is centered vertically in the available space but may sometimes appear misaligned because of rounding errors or descenders (qypgj).
LABELFONT
Path to the TrueType font file to use when rendering the label. The path is specified relative to the cwc2 directory. The font file must exist on the server to be valid.
LABELFONTSIZE
The size of font to use for the label.
LABELALIGN
The horizontal alignment of the label on the button. One of left, center or right.
LABELANTIALIAS
Control the use of antialiasing when rendering the label. This is sometimes desirable to control the quality of the font rendering.
IMAGE
The image to display in the button. The image is displayed at the left edge of the button, centered vertically.
USETEXTBUTTONCACHE
Control the use of caching when rendering text buttons. Text buttons take a relatively long time to render so it is desirable to cache the text button for improved application performance. However, when developing a new template or modifying existing buttons, it is useful to turn off caching temporarily.

CWC2 Widget Details

cwcwidget

Description:
CWCWidget is the most basic type of widget. It provides the basic functionality of a widget and defines the standard API that widgets must implement in order to function correctly with the CWC service instance. All widgets represent themselves in the template using the CWCWidget tag and set the type and other attributes as necessary.
Tag:

<CWC2 TYPE="cwcwidget" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]"/>

Attributes:
The cwcwidget tag has attributes from the attributes from the Base Attributes group.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

boundingboxpopupwidget

Description:
The BoundingBoxPopupWidget displays a popup dialog box that allows the user to enter bounding box coordinates to zoom to (either rectangle or point)
Tag:

<CWC2 TYPE="boundingboxpopup" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The boundingboxpopupwidget tag has attributes from the and groups.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_INPUT_TYPE
the type of the last navigation command, either POINT or RECTANGLE
NAV_INPUT_COORDINATES
the coordinates that the last command generated. May be a single point, or two points representing a rectangle
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
clickBoundingBoxPopup()
callback function for the user clicking the Zoom to Bounding Box button
applyBoundingBox()
callback function to apply a Zoom to Bounding Box or Point Coordinates.
getMapExtents()
return the current extents of the map.
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

catalogsearchwidget

Description:
The catalog search width allows a user to search a catalog of WMS layers based on an entered keyword and select one or more layers from the results to add to the current context.
Tag:

<CWC2 TYPE="catalogsearch" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]"/>

Attributes:
The catalogsearchwidget tag has attributes from the and groups.
Form Elements:
LAYER_TITLE
The title for the last layer that was selected from the catalog search function
LAYER_ALT_TITLE
The alternate title for the last layer that was selected from the catalog search function
LAYER_SERVER_VERSION
The version of WMS that the server supports for the last layer that was selected from the catalog search function
LAYER_CONNECT_STRING
The connection string for the last layer that was selected from the catalog search function
LAYER_ABSTRACT
The abstract for the last layer that was selected from the catalog search function
LAYER_LLBB
The LatLong bounding box for the last layer that was selected from the catalog search function
LAYER_STYLES
The styles supported by the last layer that was selected from the catalog search function
LAYER_FORMATS
The formats for the last layer that was selected from the catalog search function
LAYER_SRSS
The SRS values supported by the last layer that was selected from the catalog search function
Javascript Functions:
clickCatalogSearch()
callback function for the user clicking the "catalog" button
catalogSearchCB()
callback function for the catalog search page.
Javascript Variables:
None

clearpointswidget

Description:
The ClearPoints widget allows the user to clear all user created points and refresh the current page without performing any other navigation.
Tag:

<CWC2 TYPE="clearpoints" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]"/>

Attributes:
The clearpointswidget tag has attributes from the and groups.
Form Elements:
CLEAR_POINTS
Controls the activation of the ClearPoint widget.
Javascript Functions:
clickClearPoints()
Callback function for the user clicking the "Clear Points" button.
Javascript Variables:
None

compasspointwidget

Description:
The CompassPoint widget is a clickable image that the user can click to pan in a given direcion.
Tag:

<CWC2 TYPE="compasspoint" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DIRECTION="[1|0|7|6|5|4|3|2]" PANPERCENT="[0 < integer < 100]" IMAGEBASE="[string]" IMAGEEXTENSION="[string]"/>

Attributes:
The compasspointwidget tag has attributes from the and groups plus the following attributes:
IMAGEWIDTH
The width of the image in pixels.
IMAGEHEIGHT
The height of this image in pixels
IMAGETIP
The alternate text and tooltip to use for this image.
IMAGECLASS
The CSS Class to control the rendering of this image. The default is none.
IMAGESTYLE
The CSS style to control the rendering of this image. The default is none.
DIRECTION
The direction that the compass point will pan the map when clicked.
PANPERCENT
The amount to pan the map in the given direction as a percentage of the map width or height.
IMAGEBASE
Compass point widgets are expected to be a base image plus a direction plus an extension. This sets the base path to the images. For example
IMAGEEXTENSION
Compass point widgets are expected to be a base image plus a direction plus an extension. This sets the extension for the images.
Form Elements:
NAV_PAN
the compass point tool that was clicked to indicate the direction the map should pan in
Javascript Functions:
clickPan()
callback function for the user clicking the Pan button
Javascript Variables:
None

cursorposwidget

Description:
Display the current cursor position in geographic coordinates. To assist template developers, this widget can be configured to display one of the two axis of the cursor position. The cursor position must be displayed in an HTML element that can be updated, so an HTML INPUT box is used. CSS can be used to modify the appearance of the INPUT box to make it look nicer in more modern browsers.
Tag:

<CWC2 TYPE="cursorposition" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" AXIS="[X|Y]" TEXTFIELDSIZE="[0 < integer]" WIDGETCLASS="[string]" WIDGETSTYLE="[string]"/>

Attributes:
The cursorposwidget tag has attributes from the and groups plus the following attributes:
AXIS
Determine if the X or Y value of the current cursor position is displayed.
TEXTFIELDSIZE
The size in characters of the text box that displays the cursor position.
WIDGETCLASS
The CSS class to control the style of the HTML INPUT box. The default is CWCCursorPositionWidgetClass.
WIDGETSTYLE
The CSS Style to control the style of the HTML INPUT box. The default is no style.
Form Elements:
None
Javascript Functions:
CursorXMouseMoved()
callback function for tracking mouse movement in the X direction
WidgetPix2Geo()
Convert pixel position to geographic coordinates
Javascript Variables:
None

cwcjsapiwidget

Description:
Tag:

<CWC2 DEBUG="[TRUE|FALSE]"/>

Attributes:
The cwcjsapiwidget tag has no common attributes plus the following attribute:
DEBUG
Set to TRUE to see the JSAPI hidden layer's input box to assist in debugging errors only.
Form Elements:
CONTEXT
The currently loaded context
Javascript Functions:
None
Javascript Variables:
goCWCJSAPI
The global JSAPI object.

contextdownloadwidget

Description:
The ContextDownloadWidget allows the user to download the current state of the map as a Context document. Window size, current extents, and layer visibility are preserved.
Tag:

<CWC2 TYPE="contextdownload" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The contextdownloadwidget tag has attributes from the and groups.
Form Elements:
None
Javascript Functions:
clickContextDownload()
callback function for the user clicking the "download context" button
Javascript Variables:
None

errorreportwidget

Description:
This is a utility widget used to display errors that have occurred during processing. Normally the errors are non-fatal, but could be useful in debugging widgets or a new template.
Tag:

<CWC2 TYPE="errorreport" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The errorreportwidget tag has attributes from the and groups.
Form Elements:
None
Javascript Functions:
DisplayErrors()
Popup a window displaying error messages that occurred.
Javascript Variables:
None

extentwidget

Description:
The Extent widget displays one of the extents of the map in text on the output page.
Tag:

<CWC2 TYPE="extent" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" EXTENT="[MINX|MINY|MAXX|MAXY]" WIDGETCLASS="[string]" WIDGETSTYLE="[string]" TEXTFIELDSIZE="[0 < integer]"/>

Attributes:
The extentwidget tag has attributes from the and groups plus the following attributes:
EXTENT
The extent to display.
WIDGETCLASS
The CSS class to control the style of the extent text. The default is CWCExtentWidgetClass
WIDGETSTYLE
The CSS style to control the style of the extent text. The default is none.
TEXTFIELDSIZE
The size in characters to make the extent widget in JSAPI mode.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

linkwidget

Description:
The Link widget allows the template to display a button that will open an arbitrary URL such as a help page for an application.
Tag:

<CWC2 TYPE="link" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" HREF="[string]"/>

Attributes:
The linkwidget tag has attributes from the and groups plus the following attribute:
HREF
The URL to open when the user clicks the associated button.
Form Elements:
None
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

extractwidget

Description:
The Extract widget is specific to GeoBase. It connects the user to an extraction service that allows for the extraction of visible layers at the current extents.
Tag:

<CWC2 TYPE="extract" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" HREF="[string]" MINSCALE="[integer]" MAXSCALE="[integer]"/>

Attributes:
The extractwidget tag has attributes from the and groups plus the following attributes:
HREF
The URL to connect to for the extraction service.
MINSCALE
The minimum scale at which extraction is allowed. Below this, the user will be warned that extraction is not allowed.
MAXSCALE
The maximum scale at which extraction is allowed. Above this, the user will be warned that extraction is not allowed.
Form Elements:
None
Javascript Functions:
doExtract()
callback function for the user clicking the Extract button
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

geobasecontextselectorwidget

Description:
The GeoBase context selector is a GeoBase-specific widget that controls the display of layers in groups and themes in a custom layer control. The widget is controlled by a theme file that describes the relationship of layers from a given context to groups and themes. The widget allows the user to control layer visibility for themes and groups as a whole unit and abstracts the actual layer names away from the user.
Tag:

<CWC2 TYPE="geobasecontextselector" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]"/>

Attributes:
The geobasecontextselectorwidget tag has attributes from the attributes from the Base Attributes group.
Form Elements:
GEOBASECONTEXTSELECTOR
Used to signal that the GeoBase application has just loaded and not to process possible changes from the URL
CONTEXT
The currently loaded context
TEMPLATE
The current template that is being displayed
GEOBASECONTEXTSELECTOR_CONTEXT_CHANGED
Used to signal that the user has changed to a different context and not to try to re-apply the layer visibility.
GEOBASECONTEXTSELECTOR_GROUPS_ON
Contains the names of the groups that are currently visible or requested to be visible
GEOBASECONTEXTSELECTOR_TEMPLATE
Contains the name of the current template.
Javascript Functions:
GeobaseContextSelector_ThemeClicked()
Select/Deselect all the groups in a theme
GeobaseContextSelector_GroupClicked()
Select/Deselect a group of layers
GeobaseContextSelector_openLayerInfo()
Open the layer information dialog for the group of layers.
GeobaseContextSelected()
Cause a different context to be selected
CBGeobaseContextSelecto()
No description available.
GeobaseContextSelector_UpdateGroupsOn()
Update a form variable with the names of groups that are selected
Javascript Variables:
gGBContextSelectnGroups
the number of groups available for selection.
gGBContextSelectGroups
an array of groups available for selection.

geobasecontextuploadwidget

Description:
The GeobaseContextUpload widget is a specialized upload widget that allows the user to restore the state of the GeoBase application from a previously saved context without allowing the user to upload arbitrary contexts.
Tag:

<CWC2 TYPE="geobasecontextupload" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The geobasecontextuploadwidget tag has attributes from the and groups.
Form Elements:
GEOBASE_CONTEXT
The context to load the layer visibility and extents from.
Javascript Functions:
clickGeobaseContextUpload()
callback function for the user clicking the "upload context" button
OpenContextCB()
callback function for the Open Context dialog
Javascript Variables:
None

helpwidget

Description:
CWCWidget is the most basic type of widget. It provides the basic functionality of a widget and defines the standard API that widgets must implement in order to function correctly with the CWC service instance. All widgets represent themselves in the template using the CWCWidget tag and set the type and other attributes as necessary.
Tag:

<CWC2 TYPE="help" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]"/>

Attributes:
The helpwidget tag has attributes from the attributes from the Base Attributes group.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

keymapwidget

Description:
The KeyMap widget displays a key map (or reference map) that displays the users currently viewed extents within a larger reference frame.
Tag:

<CWC2 TYPE="keymap" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]" WIDTH="[0 < integer]" HEIGHT="[0 < integer]" COLOR="[RRR GGG BBB]" OUTLINECOLOR="[RRR GGG BBB]" MINX="[integer]" MINY="[integer]" MAXX="[integer]" MAXY="[integer]" SRS="[string]"/>

Attributes:
The keymapwidget tag has attributes from the and groups plus the following attributes:
DEFAULT
From NavTool, controls if this is the default navigation widget. Ignored for KeyMapWidget.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of the Keymap image tag. Default is none.
WIDTH
The width in pixels of the keymap image.
HEIGHT
The height in pixels of the keymap image.
COLOR
The fill color for the box drawn to represent the current extents. Set to "-1 -1 -1" for transparent. The default is "-1-1-1".
OUTLINECOLOR
The outline color for the box drawn to represent the current extents. The default is "255 0 0" for Red.
MINX
The minimum X value in geographic coordinates that this image represents.
MINY
The minimum Y value in geographic coordinates that this image represents.
MAXX
The maximum X value in geographic coordinates that this image represents.
MAXY
The maximum Y value in geographic coordinates that this image represents.
SRS
The projection that the extents for this widget are defined in.
Form Elements:
NAV_INPUT_TYPE
the type of the last navigation command, either POINT or RECTANGLE
NAV_INPUT_COORDINATES
the coordinates that the last command generated. May be a single point, or two points representing a rectangle
KEYMAP_EXTENTS_MINX
The minimum X extent of the keymap.
KEYMAP_EXTENTS_MINY
The minimum Y extent of the keymap.
KEYMAP_EXTENTS_MAXX
The maximum X extent of the keymap.
KEYMAP_EXTENTS_MAXY
The maximum Y extent of the keymap.
Javascript Functions:
TrackMouseXY()
called when the user moves the mouse.
FindObjectPosX()
Return the X coordinates of an HTML object on the page.
FindObjectPosY()
Return the Y coordinates of an HTML object on the page.
KeyMapClicked()
handle the user clicking on the Key Map
Javascript Variables:
KeyMapWidget
Ensure that mouse movement events are captured under IE.
gnMouseX
the current X position of the mouse
gnMouseY
the current Y position of the mouse

languagewidget

Description:
The Language widget allows the template designer to specify several languages that the user can switch to from the current template, and makes the current language available to widgets that support a multilingual interface. This widget uses sub-tags in the form: <language name="en-CA" template="template.html" context="context.xml" default="true"/> to specify the relationship between a language and some template and context. There is a javascript function setLanguage that can be used to automatically load the template associated with a given language while preserving the current context extents and layer visibility.
Tag:

<CWC2 TYPE="language" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]"/>

Attributes:
The languagewidget tag has attributes from the attributes from the Base Attributes group.
Form Elements:
language
The current language that is in use.
TEMPLATE
The current template that is being displayed
CONTEXT
The currently loaded context
Javascript Functions:
setLanguage()
set the current language
Javascript Variables:
None

layermanagerwidget

Description:
The LayerManager widget is a complex dialog box that allows the user to manage the layers in the current context and add new layers from a list of cached WMS servers.
Tag:

<CWC2 TYPE="layermanager" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The layermanagerwidget tag has attributes from the and groups.
Form Elements:
currentState
a key that references the current state of the context.
Javascript Functions:
clickLayerManager()
callback function for the user clicking the Layer Management button
LayerManagerCB()
callback function to handle user input from the Layer Manager dialog
Javascript Variables:
None

legendpopupwidget

Description:
The LegendPopup widget allows the user to popup a legend for the current context in a separate window.
Tag:

<CWC2 TYPE="legendpopup" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The legendpopupwidget tag has attributes from the and groups.
Form Elements:
LEG_WID_POPUP_OPEN
Used to track if the legend widget has an open popup window so it can be refreshed in CWC2 JSAPI mode.
Javascript Functions:
clickLegendPopup()
callback function for the user clicking the Legend button
Javascript Variables:
None

legendtemplatewidget

Description:
The Legend widget allows the user display a legend based on a legend template. The Legend can either be embedded in the same page or displayed in a separate window.
Tag:

<CWC2 TYPE="legend" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]"/>

Attributes:
The legendtemplatewidget tag has attributes from the attributes from the Base Attributes group.
Form Elements:
None
Javascript Functions:
LegendTemplateLayerInfo()
Callback function to handle user requesting information about a layer from the LegendTemplate widget.
Javascript Variables:
None

locatewidget

Description:
The Locate widget provides a dialog box that can be used to search for postal codes, place names and NTS map sheets and zoom the map to one of the results of the search.
Tag:

<CWC2 TYPE="locate" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The locatewidget tag has attributes from the and groups.
Form Elements:
LOCATE_ZOOM_TO
The geographic coordinates to zoom to when locating something
LOCATE_ADD_ELEMENT
Used to track the element that has been added to the map (point or rectangle)
LOCATE_LATLONG
The lat/long value to zoom to.
Javascript Functions:
onClickLocate()
callback when the locate button is clicked
LocateCB()
callback function to handle user input from the Locate dialog
Javascript Variables:
None

mapdhtmlwidget

Description:
The MapDHTML widget displays the actual visualization of the current context and provides many of the mechanisms for other tools to do their job, primarily the navigation tools.
Tag:

<CWC2 TYPE="mapdhtmlimage" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" MARQUEECOLOR="[[#]RRGGBB]" MARQUEEWIDTH="[0 < integer]" MARQUEEHEIGHT="[0 < integer]" MARQUEEVERTICALIMAGE="[string]" MARQUEEHORIZONTALIMAGE="[string]" MINSCALE="[integer]" MAXSCALE="[integer]" ALLOWRESIZE="[TRUE|FALSE]" WIDTH="[0 < integer]" HEIGHT="[0 < integer]" WAITIMAGE="[string]" WAITIMAGEWIDTH="[0 < integer]" WAITIMAGEHEIGHT="[0 < integer]" MULTILAYER="[TRUE|FALSE]"/>

Attributes:
The mapdhtmlwidget tag has attributes from the attributes from the Base Attributes group plus the following attributes:
MARQUEECOLOR
The color to draw the zoom box in.
MARQUEEWIDTH
When drawing the marquee, this is the width/height to make the edges of the zoom box.
MARQUEEHEIGHT
The height of the optional marquee image.
MARQUEEVERTICALIMAGE
See MARQUEEHORIZONTALIMAGE. This is used for the top and bottom edges.
MARQUEEHORIZONTALIMAGE
The image to use for drawing the marquee. If properly used, you can create dashed line effects using this. The left and right layers used to draw the edges of the zoom box have this image as the background and show only a slice of the image the height of the zoom box and the defined marquee width.
MINSCALE
The minimum scale to draw the current context at. Zooming in beyond this scale will be prevented.
MAXSCALE
The maximum scale to draw the current context at. Zooming out beyond this scale will be prevented.
ALLOWRESIZE
control the resizability of the map widget. This allows the application to respect or ignore the Window tag in a context document.
WIDTH
The width in pixels of the map width image.
HEIGHT
The initial height in pixels of the map widget image.
WAITIMAGE
The image to use for showing ongoing progress
WAITIMAGEWIDTH
The width in pixels of the wait image.
WAITIMAGEHEIGHT
The height in pixels of the wait image.
MULTILAYER
Used when the application is run in JavaScript API mode. If set to true, each map layer will be drawn into a spearate DHTML layer. Default value is false.
Form Elements:
NAV_INPUT_TYPE
the type of the last navigation command, either POINT or RECTANGLE
NAV_INPUT_COORDINATES
the coordinates that the last command generated. May be a single point, or two points representing a rectangle
MAP_EXTENTS_MINX
The minimum X of the map in geographic coordinates
MAP_EXTENTS_MINY
The minimum Y of the map in geographic coordinates
MAP_EXTENTS_MAXX
The maximum X of the map in geographic coordinates
MAP_EXTENTS_MAXY
The maximum Y of the map in geographic coordinates
MAP_WIDTH
The width of the map window in pixels
MAP_HEIGHT
The height of the map window in pixels
MAP_CURSOR_POS_X
The current X position of the cursor over the map
MAP_CURSOR_POS_Y
The current Y position of the cursor over the map
NAV_CMD
The last command that was used to interact with the map
Javascript Functions:
MapWgetLayer()
return a DHTML layer object by id
MapWclipLayer()
clip the map layer to its bounding box as in during panning.
MapWcreateLayer()
create a new DHTML layer
MapWsetLayerBackgroundColor()
set the background color for a DHTML layer.
MapWshowLayer()
show a DHTML layer.
MapWhideLayer()
hide a DHTML layer
MapWsetZoomBoxSettings()
set the parameters for a user-resizable box that can be used for zooming or querying.
MapWhandleresize()
callback function for the user resizing the page.
MapWchkMouseUp()
handle the user releasing the mouse button
MapWPointNavigation()
submit the current page with a single point for navigation
MapWmapTool()
handle the user pressing a mouse button.
MapWgetImageXY()
return the XY coordinates of an image on the page.
MapWgetMouse()
Get the current position of the mouse..
MapWinsideMap()
return true if a point is inside the map area
MapWstartZoomBox()
put the map widget into Zoom Box mode.
MapWstopZoomBox()
end Zoom Box mode
MapWsetClip()
set the clipping parameters for a DHTML layer
MapWFindObjectPosX()
return the X coordinates of an HTML object on the page.
MapWFindObjectPosY()
return the Y coordinates of an HTML object on the page.
MapWCreateDHTMLLayers()
initializes the DHTML layers required by the Map widget.
MapWidgetInitVariables()
initialization function for the map widget variables.
Javascript Variables:
gMapWnetscape
the netscape version
gMapWgoodIE
track the detected browser version for IE
gMapWnetscape6
the netscape version if version 6
gMapWvspcIEadjust
track if IE is in use and adjust the location of layers accordingly
gMapWhspcIEadjust
track if IE is in use and adjust the location of layers accordingly.
gMapWiWidth
the width of the map widget window
gMapWiHeight
the height of the map widget window
gMapWhspc
the horizontal adjustment to apply to the layers.
gMapWvspc
The vertical adjustment to apply to the layers
gMapWmouseX
the X coordinate of the current mouse position
gMapWmouseY
the Y coordinate of the current mouse position
gMapWx1
The X coordinate of the first corner of the zoom box
gMapWy1
The Y coordinate of the first corner of the zoom box
gMapWx2
The X coordinate of the second corner of the zoom box
gMapWy2
The Y coordinate of the second corner of the zoom box
gMapWfirstx
track the first X coordinate clicked
gMapWfirsty
track the first Y coordinate clicked
gMapWsecondx
the second X coordinate clicked
gMapWsecondy
the second Y coordinate clicked
gMapWzleft
the location of the left layer of the zoom box.
gMapWzright
The location of the right layer of the zoom box
gMapWztop
The location of the top layer of the zoom box
gMapWzbottom
The location of the bottom layer of the zoom box.
gMapWmapX
the X coordinate of the map widget
gMapWmapY
the Y coordinate of the map widget
gMapWdragging
track the state of the map widget drag function
gMapWtoplayer
the top edge of the zooming box
gMapWleftlayer
The left edge of the zooming box
gMapWbottomlayer
the bottom edge of the zooming box
gMapWrightlayer
the right edge of the zooming box

mapsizewidget

Description:
The MapSize widget displays a widget that allows the user to specify new dimensions for the map image. Note that the MapDHTML widget must have ALLOWRESIZE set to true for this to have any effect.
Tag:

<CWC2 TYPE="mapsize" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]"/>

Attributes:
The mapsizewidget tag has attributes from the and groups.
Form Elements:
SET_MAP_WIDTH
The new map width in pixels when changing the map window size
SET_MAP_HEIGHT
The new map height in pixels when changing the map window size
Javascript Functions:
clickMapSizePopup()
callback function for the user clicking the Map Size button
applyMapSize()
set the map size.
cancelMapSize()
callback function when the user cancels changing the mapsize so the selection can be reset.
getMapSize()
return the size of the map in pixels
changeMapSize()
Callback function when the user has selected a new mapsize from the combo box on the page..
Javascript Variables:
None

mapunitswidget

Description:
The MapUnits widget displays the current map units as a label on the page.
Tag:

<CWC2 TYPE="mapunits" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" WIDGETCLASS="[string]" WIDGETSTYLE="[string]"/>

Attributes:
The mapunitswidget tag has attributes from the and groups plus the following attributes:
WIDGETCLASS
The CSS class to control the style of the map units HTML INPUT text box. The default is CWCMapUnitClass.
WIDGETSTYLE
The CSS style to control the style of the map units HTML INPUT text box. The default is none.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

panmapwidget

Description:
The PanMap widget is a navigation tool that allows the user to drag the map image to recenter it at a given location.
Tag:

<CWC2 TYPE="panmap" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]"/>

Attributes:
The panmapwidget tag has attributes from the and groups plus the following attributes:
DEFAULT
Controls whether this widget is the default selected navigation tool.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of the pan image tag. Default is none.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_ALLOW_RECTANGLE
Tracks whether the current navigation tool uses a rubber-banding box or not.
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
NavSetActiveTool()
set the active navigation tool for a particular group of tools
PanMapWInit()
initialize the Drag - Pan tool
PanMapWMouseMove()
handle the user moving the mouse
PanMapWMouseUp()
handle the user pressing the mouse button.
PanMapWMouseDown()
handle the user pressing the mouse button
PanMapWDragEnd()
stop drag-panning the map
PanMapWDragStart()
start dragging the map
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.
gnPanWFirstPointX
the X coordinate of the point at which the drag pan started
gnPanWFirstPointY
the Y coordinate of the point at which the drag pan started

printwidget

Description:
The PrintPopup widget displays a popup dialog that allows the user to create a printable version of the map with some additional cartographic annotations.
Tag:

<CWC2 TYPE="printpopup" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]" TEMPLATE="[string]"/>

Attributes:
The printwidget tag has attributes from the and groups plus the following attribute:
TEMPLATE
The path to a legend template file that controls the styling of the legend in the printed map.
Form Elements:
None
Javascript Functions:
clickPrintPopup()
callback function for the user clicking the Print button
Javascript Variables:
None

projectionlabelwidget

Description:
The ProjectionLabel widget displays the name of the current projection from those defined in a common resource called "projection". The structure of the common resource is: <projection name="human name" srs="epsg code"/>. This structure is shared with the projection selector widget if used.
Tag:

<CWC2 TYPE="projectionlabel" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" WIDGETCLASS="[string]" WIDGETSTYLE="[string]" TEXTFIELDSIZE="[0 < integer]"/>

Attributes:
The projectionlabelwidget tag has attributes from the and groups plus the following attributes:
WIDGETCLASS
The CSS class to control the style of the projection label text. The default is CWCProjectionLabelWidgetClass.
WIDGETSTYLE
The CSS style to control the style of the projection label text. The default is none.
TEXTFIELDSIZE
The size in characters to make the projection label input when in JSAPI mode.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

projectionselectorwidget

Description:
The ProjectionSelector widget allows the user to select a new projection for the current context from those defined in a common resource called "projection". The structure of the common resource is: <projection name="human name" srs="epsg code"/>. This structure is shared with the projection label widget if used.
Tag:

<CWC2 TYPE="projectionselector" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The projectionselectorwidget tag has attributes from the and groups.
Form Elements:
MAP_PROJECTION
The current projection of the map.
Javascript Functions:
clickProjectionSelectorPopup()
callback for the user clicking the projection selection button
applyProjection()
callback to apply a change in projection.
getProjectionList()
return the list of projections that can be used in this application.
getCurrentProjection()
return the current projection of the map.
Javascript Variables:
None

querywidget

Description:
The Query widget displays a GetFeatureInfo query result for each visible layer at the point the user clicks.
Tag:

<CWC2 TYPE="query" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]" RADIUS="[1 < integer]" MAXFEATURES="[1 < integer]"/>

Attributes:
The querywidget tag has attributes from the and groups plus the following attributes:
DEFAULT
Controls whether this widget is the default selected navigation tool.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of the pan image tag. Default is none.
RADIUS
The number of pixels to search around the clicked location for features. This is a CubeWerx-specific extension to the current WMS GetFeatureInfo request and may not be supported by all servers, althought it should at least be ignored. The default is 3.
MAXFEATURES
The number of features to limit a GetFeatureInfo response to. This is the limit for each layer, it is not cumulative. This is a CubeWerx-specific extension to the WMS GetFeatureInfo request and may not be supported by all servers, although it should be at least ignored. The default is 5.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_ALLOW_RECTANGLE
Tracks whether the current navigation tool uses a rubber-banding box or not.
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
NavSetActiveTool()
set the active navigation tool for a particular group of tools
QueryWMouseClick()
handle the user clicking the mouse on the map.
QueryWMouseMove()
handle the user moving the mouse over the map.
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

quickzoomwidget

Description:
The QuickZoom widget defines a list of known extents with human-readable names that the user can select to zoom to quickly. The format for the sub-tags is: <view name="Human Name" minx="-2200000" miny="-712631" maxx="3072800" maxy="3840000" SRS="epsg:42304"/> where the SRS is the projection that the coordinates are defined in. There may be any number of views defined.
Tag:

<CWC2 TYPE="quickzoom" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" TITLE="[string]"/>

Attributes:
The quickzoomwidget tag has attributes from the and groups plus the following attribute:
TITLE
The text to display when nothing is selected.
Form Elements:
NAV_QUICKZOOM
the coordinates to zoom to from the quickzoom widget
SEL_QUICKZOOM
A copy of the currently selected quickzoom value
Javascript Functions:
changeQuickZoom()
callback function for handling the user selecting a new entry in the QuickZoom selector
Javascript Variables:
None

recenterwidget

Description:
The Recenter widget allows the user to recenter the map at the clicked location.
Tag:

<CWC2 TYPE="recenter" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]"/>

Attributes:
The recenterwidget tag has attributes from the and groups plus the following attributes:
DEFAULT
Controls whether this widget is the default selected navigation tool.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of the pan image tag. Default is none.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_ALLOW_RECTANGLE
Tracks whether the current navigation tool uses a rubber-banding box or not.
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
NavSetActiveTool()
set the active navigation tool for a particular group of tools
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

rulerwidget

Description:
The Ruler widget is a tool that allows the user to interactively drawn line segments on the map and display the cumulative distance of the segments in ground units.
Tag:

<CWC2 TYPE="ruler" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]" UNITS="[INCHES|FEET|MILES|METERS|KILOMETERS|DEGREES|PIXELS]" NUMBEROFPOINTS="[0 < integer]" SPACEBETWEENPOINTS="[0 < integer]"/>

Attributes:
The rulerwidget tag has attributes from the and groups plus the following attributes:
DEFAULT
Controls whether this widget is the default selected navigation tool.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of the pan image tag. Default is none.
UNITS
The units to display the ruler results in.
NUMBEROFPOINTS
The maximum number of points to make available to the ruler tool. More points means a longer distance can be measured, but increasing the burden on the client computer and can slow it down since each point is represented by a DHTML layer. The default is 100.
SPACEBETWEENPOINTS
Distance in pixels between the points drawn when using the ruler tool. The default value is 15.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_ALLOW_RECTANGLE
Tracks whether the current navigation tool uses a rubber-banding box or not.
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
NavSetActiveTool()
set the active navigation tool for a particular group of tools
RulerWidgetInit()
Initialize the Ruler widget
RulerWMouseMove()
handle the user moving the mouse over the map.
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.
gRulergblPixelSize
The size in ground units of a single pixel.
gRulermapMinX
The minimum X value in geographic coordinates in the map.
gRulermapMaxY
The maximum X value in geographic coordinates in the map.
gRulerMapImgOX
The X location of the map image
gRulerMapImgOY
The Y location of the map image
gRulerCurrentTool
the current tool in use (the ruler is the only tool right now)
gRulerfirstClickDist
The distance to the first click of the mouse button.
gRulercMapWidth
The width in pixels of the map image
gRulercMapHeight
The height in pixels of the map image
gRulerg_digitTool
not used
gRulerg_end_digit
not used
gRulerareaMode
controls if the ruler is in line or area mode.
gRulerareaString
the string to display for the area defined by the ruler lines
gRulersUnits
The units that the ruler is measuring distance in
gRulerHideLayers
layers to hide that are in use by the ruler
gRulerFirstUse
track if this is the first time the ruler has been used
gRulerNbPoints
The number of points to make available to the ruler
gRulerUserUnit
No description available.
gRulerSpaceBetweenPoints
description available.

rulerresultwidget

Description:
The RulerResults widget allows the results of the users distance measurements to be displayed in a stylable HTML INPUT box.
Tag:

<CWC2 TYPE="rulerresult" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" WIDGETCLASS="[string]" WIDGETSTYLE="[string]" TEXTFIELDSIZE="[0 < integer]"/>

Attributes:
The rulerresultwidget tag has attributes from the and groups plus the following attributes:
WIDGETCLASS
The CSS class to control the style of the HTML INPUT box. The default is CWCRulerResultWidgetClass.
WIDGETSTYLE
The CSS style to control the style of the HTML INPUT box. The default is none
TEXTFIELDSIZE
The size in characters of the HTML INPUT box to display the position in.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

scalewidget

Description:
The Scale widget displays an HTML INPUT box that the user can view the current map scale and enter a scale to zoom to. The Scale widget needs to be combined with another widget that actually causes the map to refresh, such as an UpdateMap widget.
Tag:

<CWC2 TYPE="scale" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" SIZE="[1 < integer]"/>

Attributes:
The scalewidget tag has attributes from the and groups plus the following attribute:
SIZE
The size in characters of the scale HTML INPUT box. The default is 8.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

scalebarwidget

Description:
Display a scalebar image for the current extents of the current context.
Tag:

<CWC2 TYPE="scalebar" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" WIDTH="[0 < integer]" HEIGHT="[0 < integer]" INTERVALS="[0 < integer]" UNITS="[INCHES|FEET|MILES|METERS|KILOMETERS]" COLOR="[RRR GGG BBB]" BACKGROUNDCOLOR="[RRR GGG BBB]" OUTLINECOLOR="[RRR GGG BBB]" LABELCOLOR="[RRR GGG BBB]" LABELSIZE="[TINY|SMALL|MEDIUM|LARGE|GIANT]" TRANSPARENT="[TRUE|FALSE]" IMAGETYPE="[string]"/>

Attributes:
The scalebarwidget tag has attributes from the attributes from the Base Attributes group plus the following attributes:
WIDTH
The width in pixels of the scalebar image to draw.
HEIGHT
The height to draw the scalebar image. Note that this includes the text labels.
INTERVALS
The number of intervals to include in the scalebar. The default is 5.
UNITS
The units to draw the scalebar in. The default is kilometers.
COLOR
The color to draw the foreground of the scalebar with. The default is white, "255 255 255".
BACKGROUNDCOLOR
The background color to draw the scalebar with. The default is black, "0 0 0".
OUTLINECOLOR
The outline color to draw the scalebar with. The default is black, "0 0 0";
LABELCOLOR
The color to draw the labels with. The default is black, "0 0 0".
LABELSIZE
The size of the text to draw the labels with. The default is SMALL.
TRANSPARENT
Controls the transparency of the scalebar image. The default is true.
IMAGETYPE
The type of the image to display the scalebar as. This is useful if the main map is PNG24 but the scalebar should be displayed in a format that browsers can display transparency for (like PNG).
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

scalezoomwidget

Description:
The ScaleZoom widget displays a series of preset scale buttons that the user can use to quickly zoom in or out at predefined intervals. The intermediate scales are defined using sub-tags as follows: <ZOOMVALUE SCALE="42000000" IMAGE="images/zoom_h_1.gif" IMAGEWIDTH="14" IMAGEHEIGHT="22"/>. Any number of zoomvalues are allowed, but there is likely a practical limit depending on the images used.
Tag:

<CWC2 TYPE="scalezoom" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" INCREASEIMAGE="[string]" DECREASEIMAGE="[string]" ORIENTATION="[HORIZONTAL|VERTICAL]"/>

Attributes:
The scalezoomwidget tag has attributes from the attributes from the Base Attributes group plus the following attributes:
INCREASEIMAGE
The image to use for the scale zoom increase button.
DECREASEIMAGE
The image to use for the scale zoom decrease button.
ORIENTATION
Controls the orientation of the images that make up the scale zoom widget.
Form Elements:
SCALE_ZOOM
the scale to zoom to if the user changes the scale value and updates the map
Javascript Functions:
clickScaleValue()
callback function for the user changing the scale value
Javascript Variables:
None

sharedresourcewidget

Description:
SharedResource is an invisible widget that defines some set of values that are to be shared among one or more widgets. This was implemented to share projection information between the ProjectionSelector and ProjectionLabel widgets, but could be used for any widgets that might need it. The format of subtags is arbitrary and depends on the widgets that are using the information.
Tag:

<CWC2 TYPE="sharedresource" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" NAME="[string]"/>

Attributes:
The sharedresourcewidget tag has attributes from the attributes from the Base Attributes group plus the following attribute:
NAME
The name of the shared resource.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

timefilterwidget

Description:
The TimeFilter widget allows the user to create a filter on the layers in the current context using a time value or range in accordance with the WMS specification.
Tag:

<CWC2 TYPE="timefilter" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" INPUTCLASS="[string]" INPUTSTYLE="[string]" LABELCLASS="[string]" LABELSTYLE="[string]" EARLIESTYEAR="[string]" SHOWTIME="[TRUE|FALSE]"/>

Attributes:
The timefilterwidget tag has attributes from the attributes from the Base Attributes group plus the following attributes:
INPUTCLASS
The CSS class to control the appearance of the time filter input boxes. The default is none.
INPUTSTYLE
The CSS style to control the appearance of the time filter input boxes. The default is none.
LABELCLASS
The CSS class to control the appearance of labels for this widget. The default is none.
LABELSTYLE
The CSS style to control the appearance of labels for this widget. The default is none.
EARLIESTYEAR
The earliest year to include in the year selector box.
SHOWTIME
Control the display of time fields. The default is false so times are not available.
Form Elements:
None
Javascript Functions:
onloadTimeFilter()
called during the page onload function to initialize the time filter widget
monthClicked()
callback when the month value is changed.
Javascript Variables:
None

titlewidget

Description:
TitleWidget is a simple widget that simply creates a label on the output page. It is meant primarily as a sample of how to implement a widget and not necessarily one that would really be used.
Tag:

<CWC2 TYPE="title" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]"/>

Attributes:
The titlewidget tag has attributes from the and groups.
Form Elements:
None
Javascript Functions:
None
Javascript Variables:
None

updatemapwidget

Description:
The UpdateMap widget allows the user to refresh the current page without performing any other navigation. This is useful for sending values in other widgets to be processed that do not have some more direct form of navigation, such as the Scale widget.
Tag:

<CWC2 TYPE="updatemap" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]"/>

Attributes:
The updatemapwidget tag has attributes from the and groups.
Form Elements:
UPDATE_MAP
set by the UpdateMap widget when the update map button is clicked
Javascript Functions:
clickUpdateMap()
callback function for the user clicking the "Update Map" button.
Javascript Variables:
None

contextuploadwidget

Description:
The ContextUpload widget allows the user to upload a Context file from their local hard drive or from a URL to the current application. This widget does not limit the user from attempting to upload contexts if the CWC2 service instance is configured not to allow it. The user will receive an error message after this widget attempts to upload the context.
Tag:

<CWC2 TYPE="contextupload" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" TEXTBUTTONCOLOR="[[#]RRGGBB]" TEXTBUTTONBACKGROUNDIMAGE="[string]" TEXTBUTTONBORDER_TOPLEFT_IMAGE="[string]" TEXTBUTTONBORDER_TOP_IMAGE="[string]" TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_RIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOM_IMAGE="[string]" TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[string]" TEXTBUTTONBORDERLEFT_IMAGE="[string]" TEXTBUTTONWIDTH="[0 < integer]" TEXTBUTTONHEIGHT="[0 < integer]" TEXTBUTTONPADDING="[0 < integer]" TEXTBUTTONNUDGE="[integer]" LABELFONT="[string]" LABELFONTSIZE="[0 < integer]" LABELALIGN="[LEFT|CENTER|RIGHT]" LABELANTIALIAS="[TRUE|FALSE]" IMAGE="[string]" USETEXTBUTTONCACHE="[TRUE|FALSE]" POPUPWIDTH="[0 < integer]" POPUPHEIGHT="[0 < integer]" TOOLBAR="[TRUE|FALSE]" MENUBAR="[TRUE|FALSE]" STATUS="[TRUE|FALSE]" SCROLLBARS="[TRUE|FALSE]" RESIZABLE="[TRUE|FALSE]"/>

Attributes:
The contextuploadwidget tag has attributes from the and groups.
Form Elements:
CONTEXT
The currently loaded context
Javascript Functions:
clickContextUpload()
callback function for the user clicking the "upload context" button
OpenContextCB()
callback function for the Open Context dialog
Javascript Variables:
None

zoomalllayerswidget

Description:
The ZoomAllLayers widget is a navigation tool that allows the user to zoom to the full extents of the original context.
Tag:

<CWC2 TYPE="zoomalllayers" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]"/>

Attributes:
The zoomalllayerswidget tag has attributes from the and groups plus the following attributes:
DEFAULT
Controls whether this widget is the default selected navigation tool.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of this widget. Default is none.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_ALLOW_RECTANGLE
Tracks whether the current navigation tool uses a rubber-banding box or not.
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
NavSetActiveTool()
set the active navigation tool for a particular group of tools
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

zoomfactorwidget

Description:
The ZoomFactor widget allows the user to enter a zoom factor that is used when the user zooms in at a point. This is ignored if the user zooms to a rectangular region. It contains the ability to restrict the zoom factor to a range of values.
Tag:

<CWC2 TYPE="zoomfactor" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" LABEL="[string]" LABELPOSITION="[0 < integer < 8]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]" LABELCLASS="[string]" LABELSTYLE="[string]" MINIMUMFACTOR="[integer]" MAXIMUMFACTOR="[integer]" DEFAULTFACTOR="[integer]" TEXTFIELDSIZE="[1 < integer]"/>

Attributes:
The zoomfactorwidget tag has attributes from the and groups plus the following attributes:
MINIMUMFACTOR
The minimum zoom factor. The default is 2.
MAXIMUMFACTOR
The maximum zoom factor. The default is no maximum.
DEFAULTFACTOR
Controls whether this widget is the default selected navigation tool.
TEXTFIELDSIZE
The size of the HTML INPUT text box. The default is 2.
Form Elements:
None
Javascript Functions:
changeZoomFactor()
callback function for handling the user changing the zoom factor (used for validation)
validateInteger()
validate an integer value.
Javascript Variables:
None

zoominwidget

Description:
The ZoomIn widget is a navigation tool that allows the user to zoom in on the map image using either a single point click or by dragging a zooming box on the map.
Tag:

<CWC2 TYPE="zoomin" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]" MINIMUMZOOMRECTANGLE="[1 < integer]"/>

Attributes:
The zoominwidget tag has attributes from the and groups plus the following attributes:
DEFAULT
Controls whether this widget is the default selected navigation tool.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of this widget. Default is none.
MINIMUMZOOMRECTANGLE
The minimum zooming rectangle that will still be considered a rectangle. Rectangles smaller than this will be considered a point zoom. The default is 5.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_ALLOW_RECTANGLE
Tracks whether the current navigation tool uses a rubber-banding box or not.
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
NavSetActiveTool()
set the active navigation tool for a particular group of tools
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

zoomoutwidget

Description:
The ZoomOut widget allows the user to zoom out of the map from a given point using the current zoom factor.
Tag:

<CWC2 TYPE="zoomout" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]" DEFAULT="[TRUE|FALSE]" WIDGETSTYLE="[string]"/>

Attributes:
The zoomoutwidget tag has attributes from the and groups plus the following attributes:
DEFAULT
Controls whether this widget is the default selected navigation tool.
WIDGETSTYLE
From NavTool, this is the CSS class to control the style of this widget. Default is none.
Form Elements:
NAV_CMD
The last command that was used to interact with the map
NAV_ALLOW_RECTANGLE
Tracks whether the current navigation tool uses a rubber-banding box or not.
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
NavSetActiveTool()
set the active navigation tool for a particular group of tools
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

zoomselectedlayerswidget

Description:
No description available. Please set this description in the constructor of this class.
Tag:

<CWC2 TYPE="zoomselectedlayers" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]"/>

Attributes:
The zoomselectedlayerswidget tag has attributes from the and groups.
Form Elements:
NAV_ZOOM
the zoom factor
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
clickZoomSelectedLayers()
callback function for the user clicking the "Zoom to Selected Layers" button
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

zoomvisiblelayerswidget

Description:
No description available. Please set this description in the constructor of this class.
Tag:

<CWC2 TYPE="zoomvisiblelayers" VISIBLE="[TRUE|FALSE]" ENABLED="[TRUE|FALSE]" IMAGE="[string]" IMAGEWIDTH="[string]" IMAGEHEIGHT="[string]" IMAGETIP="[string]" IMAGECLASS="[string]" IMAGESTYLE="[string]" TOOLSET="[string]" IMAGESELECTED="[string]" IMAGEHOVER="[string]"/>

Attributes:
The zoomvisiblelayerswidget tag has attributes from the and groups.
Form Elements:
NAV_ZOOM
the zoom factor
Javascript Functions:
setCurrentTool()
set the currently active tool from a group of tools
flipToolState()
toggle the state of a tool button
registerTool()
used to register a tool in the page
onButtonOver()
callback when the mouse moves over a button
onButtonOut()
callback when the mouse leaves a button
onButtonClick()
callback when a button is clicked.
clickZoomVisibleLayers()
callback function for the user clicking the "Zoom to Visible Layers" button
Javascript Variables:
aToolGroups
array used to manage groups of tools on the page.
aTools
array of tools on the page.

Printer Friendly

 

Docs

Installation - Linux

Application Dev Guide

Widget Guide

JavaScript API

Chameleon Wiki

Licensing

 

Related Links

MapServer Docs

 

Contact Information

Chameleon Users List