Gulf of Maine Mapping Portal - GoMMaP
 

GoMMap - Chameleon Widget Reference

This Chameleon Widget Reference details a subset of widgets that are found in the GoMMaP Sample Template. For Details on other Chameleon components, please go to the main Chameleon website found in MapTools.org: http://www.maptools.org/chameleon/.

Introduction

The Chameleon Widget Reference provides sample tags and parameter descriptions for Chameleon widgets. All attributes in a tag are written as string values in the template, meaning all values must have "quotes" around them. It is the individual widgets that will interpret the values as specified. Any errors in interpretation of the widget attributes will generate an error message when the template is processed by the Chameleon parser. A widget will ignore any parameter that is not identifiable by it.

Attribute Highlighting

In the documentation, some attributes are highlighted in different colors to identify another level of attribute grouping. There are currently three general purposes for Chameleon attributes:

Required Attributes: Attributes that are required for the widget to work.
Widget Only Attributes: Attributes that can only be defined within the widget
Widget & Shared Resource Attributes: Attributes that can also be defined within a Shared Resource.

Defining Attributes

In the documentation, attributes are listed with both their allowed value ranges/types as well as their default values. The following examples help show how these definitions should be interpreted.

ENABLED="[TRUE|FALSE]" - the valid options are either "TRUE" or "FALSE".
FORMINDEX="[0 < integer]" - any integer greater than 0 is valid, e.g., "4".
STATE="[NORMAL|SELECTED|HOVER|DISABLED]", "NORMAL" - there are four valid choices as listed, and the default value is "NORMAL".

Index

Attribute Groups

Chameleon Widgets

Chameleon Attribute Groups

This section outlines groups of attributes that can be used by a widget. Not all widgets use all groups of attributes, but if a widget uses one attribute from any of these groups that means that the widget can use any other attributes found in the same group.

Base Attributes

Parent Class:
All Chameleon widgets
Description:
The Base attributes are common to all widgets. All widgets require the TYPE attribute to be defined, while other Base attributes have default settings.
Tag:
The ChameleonWidget TYPE below is used only as an example name; no such widget exists.

<CWC2 TYPE="ChameleonWidget"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"/>

      
Attributes:
ENABLED
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Enable or disable the widget in the interface.
FORMINDEX
Type: Widget Only
Options: "[0 < integer]", "1"
Allow the widget to link to a specific HTML form page.
TYPE
Type: Required
Options: "[string]"
Indicate the actual widget object to create for this tag. This attribute is the most important attribute for all widgets and is required for all widgets.
VISIBLE
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Make the widget visible or not in the page.
Shared Resources:
There are no specific Shared Resources that can be used with Base attributes.

Button Attributes

Parent Class:
Button widgets
Description:
The Button attributes define button graphics, styles, and labels for any widget that wishes to display buttons. This includes buttons that are found either in the main interface or in the widget popup windows. These buttons can be styled the same or separately.
Tag:
The ButtonWidget TYPE below is used only as an example name; no such widget exists.
<CWC2 TYPE="ButtonWidget"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABEL="[string]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>
</CWC2>
  
Attributes:
BACKGROUNDIMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
An image to render as the background of the button. The background image is rendered on top of the background color.
DEFAULT
Type: Widget & Shared Resource
Options: "[TRUE|FALSE]", "TRUE"
Determines whether to use the Chameleon-defined default button resources.
IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to display in the button. The image is displayed at the left edge of the button, centered vertically.
<IMAGE />
Type: Widget Only
Options: Subtag (No Values)
Is a subtag placeholder for attributes to define different image definitions for the same button. The attributes below exist within this subtag and are only valid with the Button attribute group. The Image subtag is often repeated within a widget to outline the different configured button states of the widget.
IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to display in the button for a specific state. The image is displayed at the left edge of the button, centered vertically.
STATE
Type: Widget & Shared Resource
Options: "[NORMAL|SELECTED|HOVER|DISABLED]", "NORMAL"
Define what group of Button attributes are used for the button, depending on the state of activity for the button.
IMAGEHEIGHT
Type: Widget & Shared Resource
Options: "[integer]", "-1" (NULL)
The height in pixels of this image.
IMAGETIP
Type: Widget & Shared Resource
Options: "[string]", "NULL"
The alternate or tooltip text to display for this image.
IMAGEWIDTH
Type: Widget & Shared Resource
Options: "[integer]", "-1" (NULL)
The width in pixels of this image.
LABEL
Type: Widget & Shared Resource
Options: "[string]", "NULL"
The text to be displayed in the button.
LABELALIGN
Type: Widget & Shared Resource
Options: "[LEFT|CENTER|RIGHT]", "LEFT"
The horizontal alignment of the label on the button.
LABELANTIALIAS
Type: Widget & Shared Resource
Options: "[TRUE|FALSE]", "TRUE"
Control the use of antialiasing when rendering the label. This is sometimes necessary to control the quality of font rendering.
LABELCOLOR
Type: Widget & Shared Resource
Options: "[#RRGGBB]", "#000000" (black)
The font color of the label found on the button.
LABELFONT
Type: Widget & Shared Resource
Options: "[string]", "NULL"
Path to the TrueType font file to use when rendering the label. The path is specified relative to the cwc2 directory. To be valid, the font file must exist on the server.
LABELFONTSIZE
Type: Widget & Shared Resource
Options: "[0 < integer]", "NULL"
The size of font to use for the label.
ONCLICK
Type: Widget & Shared Resource
Options: "[string]", "NULL"
Call specific JavaScript when the widget button is clicked.
STYLERESOURCE
Type: Widget Only
Options: "[string]", "NULL"
Link and Identify the button style Shared Resource for the widget buttons. A Shared Resource cannot call another Shared Resource by using the STYLERESOURCE button attribute. This attribute cannot be used to include a group of attributes from another style resource.
TEXTBUTTONBORDER_BOTTOM_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the bottom edge of the text button.
TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the bottom left corner of the text button.
TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the bottom right corner of the text button.
TEXTBUTTONBORDER_LEFT_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the left edge of the text button.
TEXTBUTTONBORDER_RIGHT_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the right edge of the text button.
TEXTBUTTONBORDER_TOP_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the top edge of the button.
TEXTBUTTONBORDER_TOPLEFT_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the top left corner of the text button.
TEXTBUTTONBORDER_TOPRIGHT_IMAGE
Type: Widget & Shared Resource
Options: "[path]", "NULL"
The image to use as the top right corner of the text button.
TEXTBUTTONCOLOR
Type: Widget & Shared Resource
Options: "[#RRGGBB]", "#000000" (black)
The color to fill the background of the text button with.
TEXTBUTTONPADDING
Type: Widget & Shared Resource
Options: "[0 < integer]", "0"
The amount of space (in pixels) to leave between the image and the label.
TEXTBUTTONNUDGE
Type: Widget & Shared Resource
Options: "[integer]", "0"
The amount of 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 (e.g., q,y,p,g,j).
TOOLSET
Type: Widget & Shared Resource
Options: "[string]", "NULL"
A name indicating a logical group of tools of which only one can be selected at any one time.
USETEXTBUTTONCACHE
Type: Widget & Shared Resource
Options: "[TRUE|FALSE]", "TRUE"
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.
Shared Resources:
In the Button Attribute group there is a commonly used Shared Resource that can be defined. The default NAME of this Shared Resource is called "TextButtons".
TextButtons Style Resource
The "TextButtons" Style Shared Resource is used as a global placeholder for button attributes, but more importantly helps Chameleon application developers manage all their different button styles for any given application. Since the Button attribute group has many attribute options to define a button's style, it makes more sense to define these attributes in a Shared Resource than to define them individually for each button widget.

"TextButtons" is a reserved NAME to define the default text button style.
Named Button Style Resources
Other Style resources can be defined by naming the button style Shared Resource differently from "TextButtons". These Shared Resources are still considered text button style resources. As a Chameleon application developer you may include more than one Style Shared Resource in the same HTML template, to make different groups of interface buttons look different.

To access these "Named" button style resources, each widget within the same HTML Template must call the specifically named button style resources. This can be done by using the button group attribute STYLERESOURCE to style the widget button, or using the popup group attribute POPUPSTYLERESOURCE to style buttons found in the popup widget interfaces.
Attribute Priority
With the TextButtons Shared Resource we have introduced three locations for button attributes to be defined: the widget calling the Shared Resource, the "Named" button style resource, and the default "TextButtons" style resource. It is in that order that Chameleon prioritizes these attributes. If there is a button attribute that is defined both in the widget and in a Shared Resource, Chameleon will use the attribute defined in the widget.

If a button attribute is defined in both the "Named" Button style resource and the "TextButtons" style resource then Chameleon will take the attribute value from the "Named" style resource. These attribute priority rules do not apply to the STYLERESOURCE attribute, which can only be defined in the widget.
Example 1. SIMPLE
The example below represents the default "TextButtons" Shared Resource.

<!-- Default button style for Text Buttons -->

<cwc2 type="SharedResource" name="TextButtons">
    <textbuttonbackgroundimage value=""/>
    <imagewidth value="120"/>
    <imageheight value="24"/>
    <textbuttonpadding value="0"/>
    <textbuttonnudge value="0"/>
    <labelcolor value="111111"/>
    <labelfont value="fonts/Vera.ttf"/>
    <labelalign value="left"/>
    <labelfontsize value="8"/>
    <labelantialias value="true"/>
    <usetextbuttoncache value="false"/>
    <textbuttoncolor value="f0f0f0"/>
    <textbuttonborder_topleft_image value="borders/border_tl_1.png"/>
    <textbuttonborder_top_image value="borders/border_t_1.png"/>
    <textbuttonborder_topright_image value="borders/border_tr_1.png"/>
    <textbuttonborder_right_image value="borders/border_r_1.png"/>
    <textbuttonborder_left_image value="borders/border_l_1.png"/>
    <textbuttonborder_bottomright_image value="borders/border_br_1.png"/>
    <textbuttonborder_bottom_image value="borders/border_b_1.png"/>
    <textbuttonborder_bottomleft_image value="borders/border_bl_1.png"/>
</cwc2>
      
Example 2. ADVANCED
The example below represents a more advanced button style. It uses the STATE attribute to group button attributes together. This packaging of attributes per state allows different stylings of buttons to represent the different states for the same interface button.

Another component of this advanced Shared Resource example is the NAME attribute of the Shared Resource. Notice that it is not called "TextButtons", but is actually named "NavButtons". This Shared Resource will only be applied to widgets that specifically call for this resource. To call this Shared Resource, you must use either the STYLERESOURCE attribute for styling the widget buttons or the POPUPSTYLERESOURCE attribute to style the buttons found in the widget popup interfaces. If these attributes are not used, the widget will use the default "TextButtons" resource (if defined in the template).

<!-- NavButtons - Named Text button Shared Resource -->
<!-- for Navigation Widgets. -->

<cwc2 type="SharedResource" name="NavButtons">
    <textbuttonbackgroundimage value=""/>
    <imagewidth value="120"/>
    <imageheight value="24"/>
    <textbuttonpadding value="0"/>
    <textbuttonnudge value="0"/>
    <labelcolor value="111111"/>
    <labelfont value="fonts/Vera.ttf"/>
    <labelalign value="left"/>
    <labelfontsize value="8"/>
    <labelantialias value="true"/>
    <usetextbuttoncache value="false"/>
    <state value="normal">
        <textbuttoncolor value="f0f0f0"/>
        <textbuttonborder_topleft_image value="borders/border_tl_1.png"/>
        <textbuttonborder_top_image value="borders/border_t_1.png"/>
        <textbuttonborder_topright_image value="borders/border_tr_1.png"/>
        <textbuttonborder_right_image value="borders/border_r_1.png"/>
        <textbuttonborder_left_image value="borders/border_l_1.png"/>
        <textbuttonborder_bottomright_image value="borders/border_br_1.png"/>
        <textbuttonborder_bottom_image value="borders/border_b_1.png"/>
        <textbuttonborder_bottomleft_image value="borders/border_bl_1.png"/>
    </state>
    <state value="hover">
        <textbuttoncolor value="cccccc"/>
        <textbuttonborder_topleft_image value="borders/border_tl_2.png"/>
        <textbuttonborder_top_image value="borders/border_t_2.png"/>
        <textbuttonborder_topright_image value="borders/border_tr_2.png"/>
        <textbuttonborder_right_image value="borders/border_r_2.png"/>
        <textbuttonborder_left_image value="borders/border_l_2.png"/>
        <textbuttonborder_bottomright_image value="borders/border_br_2.png"/>
        <textbuttonborder_bottom_image value="borders/border_b_2.png"/>
        <textbuttonborder_bottomleft_image value="borders/border_bl_2.png"/>
    </state>
    <state value="selected">
        <textbuttoncolor value="cccccc"/>
        <textbuttonborder_topleft_image value="borders/border_tl_3.png"/>
        <textbuttonborder_top_image value="borders/border_t_3.png"/>
        <textbuttonborder_topright_image value="borders/border_tr_3.png"/>
        <textbuttonborder_right_image value="borders/border_r_3.png"/>
        <textbuttonborder_left_image value="borders/border_l_3.png"/>
        <textbuttonborder_bottomright_image value="borders/border_br_3.png"/>
        <textbuttonborder_bottom_image value="borders/border_b_3.png"/>
        <textbuttonborder_bottomleft_image value="borders/border_bl_3.png"/>
    </state>
</cwc2>
        

Label Attributes

Parent Class:
Label Widgets
Description:
The Label attributes are common to all widgets that allow a label to be displayed.
Tag:
The LabelWidget TYPE below is used only as an example name; no such widget exists.

<CWC2 TYPE="LabelWidget"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- Label Attribute Group-->

    LABEL="[string]"
    LABELCLASS="[string]"
    LABELHALIGN="[LEFT|CENTER|RIGHT]"
    LABELPOSITION="[0 < integer < 8]"
    LABELSTYLE="[path]"
    LABELVALIGN="[TOP|MIDDLE|BOTTOM]"/>
  
Attributes:
All LabelWidgets use the Group Attribute Label.
LABEL
Type: Widget Only
Options: "[string]", "NULL"
The text to display as the label.
LABELCLASS
Type: Widget Only
Options: "[string]", "CWCLabelClass"
The CSS class to control the rendering of this label.
LABELHALIGN
Type: Widget Only
Options: "[LEFT|CENTER|RIGHT]", "LEFT"
The horizontal alignment of the label.
LABELPOSITION
Type: Widget Only
Options: "[0 < integer < 8]", "8"
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.
LABELSTYLE
Type: Widget Only
Options: "[path]", "NULL"
The CSS style to apply to this label.
LABELVALIGN
Type: Widget Only
Options: "[TOP|MIDDLE|BOTTOM]", "MIDDLE"
The vertical alignment of this label.
Shared Resources:
There are no specific Shared Resources that can be used with Label attributes.

Popup Attributes

Parent Class:
Popup Widgets
Description:
The Popup attributes are common to all widgets that exist as a popup window interface or have the option to, such as legend popups.
Tag:
The PopupWidget TYPE below is used only as an example name; no such widget exists.

<CWC2 TYPE="PopupWidget"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- Popup Attribute Group-->

    MENUBAR="[TRUE|FALSE]"
    POPUPHEIGHT="[0 < integer]"
    POPUPSTYLERESOURCE="[string]"
    POPUPWIDTH="[0 < integer]"
    RESIZABLE="[TRUE|FALSE]"
    SCROLLBARS="[TRUE|FALSE]"
    STATUS="[TRUE|FALSE]"
    TOOLBAR="[TRUE|FALSE]"/>
  
Attributes:
MENUBAR
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Control the display of a menubar in a popup window.
POPUPHEIGHT
Type: Required
Options: "[0 < integer]"
Set the height (in pixels) of a popup window.
POPUPSTYLERESOURCE
Type: Widget Only
Options: "[string]", "NULL"
Link and Identify the button style Shared Resource found at top of HTML template, for the widgets popup window.
POPUPWIDTH
Type: Required
Options: "[0 < integer]"
Set the width (in pixels) of a popup window.
RESIZABLE
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Control if a popup window is resizable or not.
SCROLLBARS
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Control the display of scrollbars in a popup window.
STATUS
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Control the display of a status bar in a popup window.
TOOLBAR
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Control the display of a toolbar in a popup window.
Shared Resources:
There is one Shared Resource that can be defined for popups.
PopUpCss Resource
The "PopupCSS" Shared Resource is a placeholder for the location of the CSS style file you wish to use to style your popup windows. If no "PopupCSS" resource is defined, Chameleon uses its default popup.css file. You must use the reserved resource name "PopupCSS" to identify any widgets that have popup attributes.
Example 1. POPUPCSS
This is how you define this Shared Resource. Notice the name is of the Shared Resource is "PopupCSS" and that the value of the Shared Resource is a relative path to your template. If not found Chameleon will search for the CSS file found in its main directory. This path could also be a URL.

<!-- Popup CSS Shared Resource-->

<cwc2 type="SharedResource"
    name="PopupCSS"
    value="/cssdir/popup.css"/>

        

Chameleon Widgets

CursorPos

Parent Class:
Label Widgets
Description:
Display the current cursor position in the geographic coordinates of the map. To assist template developers, this widget can be configured to display one of the two axes 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="CURSORPOS"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- CursorPos Attributes-->

    AXIS="[X|Y]"
    TEXTFIELDSIZE="[0 < integer]"
    WIDGETCLASS="[string]"
    WIDGETSTYLE="[string]"

    <!-- Label Attribute Group-->

    LABEL="[string]"
    LABELPOSITION="[0 < integer < 8]"
    LABELHALIGN="[LEFT|CENTER|RIGHT]"
    LABELVALIGN="[TOP|MIDDLE|BOTTOM]"
    LABELCLASS="[string]"
    LABELSTYLE="[string]"/>

  
Attributes:
The CursorPos tag has attributes from the Base Attributes, and Label Attributes groups plus the following attributes:
AXIS
Type: Required
Options: "[X|Y]"
Determines which of the X or Y values of the current cursor position is displayed.
TEXTFIELDSIZE
Type: Widget Only
Options: "[0 < integer]", "20"
The size (in characters) of the text box that displays the cursor position.
WIDGETCLASS
Type: Widget Only
Options: "[string]", "CWCCursorPositionWidgetClass"
The CSS class to control the style of the HTML INPUT box.
WIDGETSTYLE
Type: Widget Only
Options: "[string]", "NULL"
The CSS Style to control the style of the HTML INPUT box.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
Map Widgets
A map widget must be present in the interface so this widget can display the coordinate position on the map.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
This tag example only outputs the "X" coordinate cursor position whenever the mouse is over the application map.

<cwc2 type="CursorPos" axis="X"/>
    
Example 2. ADVANCED
The coordinate position "X" will be labeled left of the output with "Longitude: ". This Label widget has also been given a CSS style to make it look nicer than the default style.

<cwc2 type="CursorPos"
    axis="X"
    label="Longitude: "
    labelposition="8"
    labelvalign="middle"
    labelclass="label"
    widgetclass="inputBox"/>

    
Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The type of attributes used by this widget determine what kind of Shared Resources the widget can use.

KeepSessionAlive

Parent Class:
Utility Widgets
Description:
Allow the current session of your Chameleon application to be active, so that the user will not lose settings during a prolonged session. This "invisible" widget needs to be placed somewhere inside the body of the page. It represents itself as an invisible 1x1 pixel image in the web page that refreshes its contents on a regular (configurable) basis in order to keep the associated PHP session alive.
Tag:

<CWC2 TYPE="KeepSessionAlive"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- KeepSessionAlive Attributes -->

    TIMEOUT="[0 < integer < 1800]"/>
  
Attributes:
The KeepSessionAlive tag has attributes from the Base Attributes group, plus the following attributes:
TIMEOUT
Type: Widget Only
Options: "[0 < integer < 1800]", "1800"
Set the period (in seconds) of user inaction before the application will timeout.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
None.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
This tag example keeps the session alive for 300 seconds or 5 minutes.
<cwc2 type="KeepSessionAlive" timeout="300"/>
      
Sample Applications:
See this widget in action! Here are some applications that use this widget. Because this widget is invisible, you will only notice if you know the difference between an application that has this widget vs. one that does not.
Shared Resources:
The type of attributes used by this widget determine what kind of Shared Resources the widget can use.

LegendTemplate

Parent Class:
Legend Widgets
Description:
Allow the user to display a legend based on a legend template. The legend can either be embedded in the same page or displayed in a separate popup window.
Tag:
If the EMBEDDED attribute is set to "TRUE", then the following widget definition is available:

<CWC2 TYPE="LegendTemplate"
    VISIBLE="[TRUE|FALSE]"
    ENABLED="[TRUE|FALSE]"

    <!-- LegendTemplate Attribute Group-->

    TEMPLATE="[path]"
    EMBEDDED="[TRUE|FALSE]"/>
  
If the EMBEDDED attribute is set to "FALSE", then the Button and Popup attribute groups are valid for this widget. The following widget definition is available:

<CWC2 TYPE="LegendTemplate"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- LedgendTemplate Attributes -->

    TEMPLATE="[path]"
    EMBEDDED="[TRUE|FALSE]"

    <!-- Popup Attribute Group -->

    MENUBAR => booleanattribute Object
    POPUPHEIGHT="[0 < integer]"
    POPUPSTYLERESOURCE="[string]"
    POPUPWIDTH="[0 < integer]"
    RESIZABLE="[TRUE|FALSE]"
    SCROLLBARS="[TRUE|FALSE]"
    STATUS="[TRUE|FALSE]"
    TOOLBAR="[TRUE|FALSE]"

    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>
  </CWC2>
    
Attributes:
The LegendTemplate tag has attributes from the Base Attributes, Button Attributes, and Popup Attributes groups plus the following attributes:
TEMPLATE
Type: Required
Options: "[path]"
The path to the template that is used by MapServer's HTML legend processor. The path, if not absolute, is considered relative to the template. To learn how to build your own MapServer HTLM legend template, please check out the MapServer Website (http://mapserver.gis.umn.edu/) and the HTML Legend How To..
EMBEDDED
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Defines two optional modes for the legend. If set to "TRUE", the legend will be placed in the interface of the application where the legend template was placed in the HTML template. If set to "FALSE", the legend will be found in a popup .
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
None.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
This is an EMBEDDED equals "TRUE" LegendTemplate example.
<cwc2 type="LegendTemplate"
    visible="true"
    enabled="true"
    embedded="true"
    template="http://www.somewhere.xx/ido_notknow/layer_template.html "/>
Example 2. ADVANCED
This is an EMBEDDED equals "FALSE" LegendTemplate example, meaning the legend is launched as a popup window by a button in the interface of the application. The button image has three possible states (normal, selected, hover). The popup buttons and launch button will be styled the same, by using the named Shared Resource, "TextButtons".

<cwc2 type="LegendTemplate"
    visible="true"
    embedded="false"
    template="http://www.somewhere.xx/ido_notknow/layer_template.html "
    styleresource="TextButtons"
    popupstyleresource="TextButtons"
    image="icons/icon_legend.png"
    imagetip="View Map Legend"
    label="Map Legend"
    popupwidth="500"
    popupheight="400"
    status="false"
    menubar="false"
    toolbar="false">
      <image state="normal"/>
      <image state="selected"/>
      <image state="hover"/>
</cwc2>
Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The LegendTemplate tag has attributes from the Button Attributes and Popup Attributes groups. This means LegendTemplate has access to the "TextButtons" and "PopUpCSS" Shared Resources. To learn about them, please refer to the appropriate attribute group section for details.

MapDHTMLWidget

Parent Class:
Map Widgets
Description:
The MapDHTML widget displays the actual visualization of the current map image and provides many of the mechanisms for other tools and widgets, primarily the navigation tools, to do their job.
Tag:

<CWC2 TYPE="MapDHTMLWidget"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- MapDHTMLWidget Attributes -->

    ALLOWRESIZE="[TRUE|FALSE]"
    HEIGHT="[0 < integer]"
    MARQUEECOLOR="[#RRGGBB]"
    MARQUEEHORIZONTALIMAGE="[path]"
    MARQUEEWIDTH="[0 < integer]"
    MARQUEEVERTICALIMAGE="[path]"
    MINSCALE="[-INF < integer < INF]"
    MAXSCALE="[-INF < integer < INF]"
    WAITIMAGE="[path]"
    WAITIMAGEHEIGHT="[0 < integer]"
    WAITIMAGEWIDTH="[0 < integer]"
    WIDTH="[0 < integer]"/>

    
Attributes:
The MapDHTMLWidget tag has attributes from the Base Attributes group, plus the following attributes:
ALLOWRESIZE
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Control the resizability of the map widget. This allows the application to respect or ignore the Window tag in a context document.
HEIGHT
Type: Required
Options: "[0 < integer]"
The initial height (in pixels) of the map widget image.
MARQUEECOLOR
Type: Widget Only
Options: "[#RRGGBB]", "#FF0000" (RED)
The color to draw the marquee in.
MARQUEEHORIZONTALIMAGE
Type: Widget Only
Options: "[path]", "/chameleon/htdocs/skins/default/images/a_pixel.gif"
The image to use for drawing the right and left sides of the marquee. The image is used as a background for the marquee and, as such, only the outermost left and right edges of the image are visable. Used creatively, in combination with the MARQUEEVERTICALIMAGE attribute, this image can create special line effects, such as dashed lines.
MARQUEEVERTICALIMAGE
Type: Widget Only
Options: "[path]", "/chameleon/htdocs/skins/default/images/a_pixel.gif"
The image to use for drawing the top and bottom sides of the marquee. The image is used as a background for the marquee and, as such, only the outermost top and bottom edges of the image are visable. Used creatively, in combination with the MARQUEEHORIZONTALIMAGE attribute, this image can create special line effects, such as dashed lines.
MARQUEEWIDTH
Type: Widget Only
Options: "[0 < integer]", "1"
When drawing the marquee, this is the width/height (in pixels) to make the edges of the zoom box.
MAXSCALE
Type: Widget Only
Options: "[-INF < integer < INF]", "1" (NULL)
The maximum scale to draw the current context at. Zooming out beyond this scale will be prevented.
MINSCALE
Type: Widget Only
Options: "[-INF < integer < INF]", "-1" (NULL)
The minimum scale to draw the current context at. Zooming in beyond this scale will be prevented.
WAITIMAGE
Type: Widget Only
Options: "[path]", "NULL"
The image showing ongoing progress
WAITIMAGEHEIGHT
Type: Widget Only
Options: "[path]", "0" (NULL)
The height (in pixels) of the wait image.
WAITIMAGEWIDTH
Type: Widget Only
Options: "[path]", "0" (NULL)
The width (in pixels) of the wait image.
WIDTH
Type: Required
Options: "[0 < integer]"
The initial width (in pixels) of the map widget image.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
None.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
This tag example is the most basic definition of the "MapDHTMLWidget".

<cwc2 type="MapDHTMLWidget"
  width="400"
  height="300"/>

      
Example 2. ADVANCED
This tag example shows the "MapDHTMLWidget" using the WAITIMAGE attributes. This means that the widget will not be using the "WaitImage" Shared Resource.

<cwc2 type="MapDHTMLWidget"
  visible="true"
  width="400"
  height="300"
  allowresize="true"
  marqueecolor="FF3333"
  marqueewidth="2"
  minscale="1"
  waitimage="http://www.somewhere.xx/images/spinner.gif"
  waitimagewidth="216"
  waitimageheight="50"/>

      
Example 3. ADVANCED
This tag example shows a more advanced widget that could use the "WaitImage" Shared Resource, since the WAITIMAGE attributes have not been defined in the widget.

<cwc2 type="MapDHTMLWidget"
  visible="true"
  width="400"
  height="300"
  allowresize="true"
  marqueecolor="FF3333"
  marqueewidth="2"
  minscale="1"/>

      
Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The type of attributes used by this widget determine what kind of Shared Resources the widget can use. For this widget, the only accessible resource is the "WaitImage" Shared Resource.
WaitImage Shared Resource
Example 1. SIMPLE
The example below represents the default named "WaitImage" Shared Resource. This Shared Resource holds a list of multilingual images that are displayed when an application is in the middle of an extended process. In this example, this Shared Resource contains English and French wait image attribute sets.

  <!-- Default style for Wait Images -->

<cwc2 type="SharedResource" name="WaitImage">
    <waitimage language="en-CA"
        waitimage="images/spinner.gif"
        waitimagewidth="216"
        waitimageheight="50"/>
    <waitimage language="fr-CA"
        waitimage="images/spinner_f.gif"
        waitimagewidth="216"
        waitimageheight="50"/>
</cwc2>

        

MapSize

Parent Class:
Map Widgets
Description:
Display a widget that allows the user to specify new dimensions for the map image. Note that the MapDHTMLWidget widget must have ALLOWRESIZE set to "TRUE" for this to have any effect. This widget can also be embedded into the interface with a drop down list or a popup that is launched by a button.
Tag:
If the EMBEDDED attribute is set to "TRUE" then the following widget definition is available. You will notice that the Popup attribute is available since the custom popup is available if it is an option in the embedded drop down list:

<CWC2 TYPE="MapSize"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- MapSize Attributes -->

    EMBEDDED="[TRUE|FALSE]"

    <!-- Popup Attribute Group -->

    MENUBAR => booleanattribute Object
    POPUPHEIGHT="[0 < integer]"
    POPUPSTYLERESOURCE="[string]"
    POPUPWIDTH="[0 < integer]"
    RESIZABLE="[TRUE|FALSE]"
    SCROLLBARS="[TRUE|FALSE]"
    STATUS="[TRUE|FALSE]"
    TOOLBAR="[TRUE|FALSE]">

      <!-- MapSize Subtag Group -->

      <MAPSIZE LABEL="[string]"
          HEIGHT="[CUSTOM|0 < integer]"
          WIDTH="[CUSTOM|0 < integer]"/>

<CWC2/>
  
If the EMBEDDED attribute is set to "FALSE" then the Button and Popup attribute groups are valid for this widget. The following widget definition is available:

<CWC2 TYPE="MapSize"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- MapSize Attribute Group-->

    EMBEDDED="[TRUE|FALSE]"

    <!-- Popup Attribute Group -->

    MENUBAR => booleanattribute Object
    POPUPHEIGHT="[0 < integer]"
    POPUPSTYLERESOURCE="[string]"
    POPUPWIDTH="[0 < integer]"
    RESIZABLE="[TRUE|FALSE]"
    SCROLLBARS="[TRUE|FALSE]"
    STATUS="[TRUE|FALSE]"
    TOOLBAR="[TRUE|FALSE]"

    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>

    <!-- MapSize Subtag Group -->

    <MAPSIZE LABEL="[string]"
        HEIGHT="[custom|0 < integer]"
        WIDTH="[custom|0 < integer]"/>

</CWC2>
    
Attributes:
The MapSize tag has attributes from the Base Attributes, Button Attributes, and Popup Attributes groups, plus the following attributes:
EMBEDDED
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Defines two optional modes for the MapSize widget. If set to "TRUE", the MapSize widget will be represented as a drop down combo box list. If set to "FALSE", the MapSize will be found in a popup.
<MAPSIZE />
Type: Required
Options: Subtag (No Values)
Is a subtag placeholder for MapSize attributes settings. These attributes define what mapsize options the user of the application has. These options are placed within the combo box list. Since there are no default settings for this widget, the subtag and attributes are required for the widget to function.
HEIGHT
Type: Required
Options: "[0 < integer]"
This attribute defines the height option (in pixels) of the map size. The HEIGHT attribute has a reserved word option "custom". If the WIDTH attribute is also defined with this word, then the user can define their own map size using the custom popup interface of the MapSize widget.
LABEL
Type: Required
Options: "[string]"
Define what is displayed to the user in the drop down list of map size options. For example, Small, Medium, Large or Custom.
WIDTH
Type: Required
Options: "[0 < integer]"
This attribute defines the Width option (in pixels) of the map size. The WIDTH attribute has a reserved word option "custom". If the HEIGHT attribute is also defined with this word, then the user can define their own map size using the custom popup interface of the MapSize widget.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
Map Widget
A map widget must be present in the interface so this widget to resize the map.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
This is an EMBEDDED equals "TRUE" MapSize example. Please note that the MapSize subtag is required.

<cwc2 type="MapSize"
    embedded="true"
    popupwidth="480"
    popupheight="200">
      <mapsize label="Small"
          width="400"
          height="300"/>
      <mapsize label="Medium"
          width="600"
          height="450"/>
      <mapsize label="Large"
          width="800"
          height="600"/>
      <mapsize label="Custom ..."
          width="custom"
          height="custom"/>
</cwc2>
Example 2. ADVANCED
This is an EMBEDDED equals "FALSE" example. Button group attributes should be defined in a Shared Resource.

<cwc2 type="MapSize"
    embedded="false"
    popupwidth="480"
    popupheight="200"
    toolbar="false"
    status="false"
    menubar="false"
    visible="true"
    image="icons/icon_mapsize.png"
    imagewidth="19"
    imageheight="18"
    imagetip="Set Map Size"
    label="Map Size">
      <mapsize label="Small"
          width="400"
          height="300"/>
      <mapsize label="Medium"
          width="600"
          height="450"/>
      <mapsize label="Large"
          width="800"
          height="600"/>
      <mapsize label="Custom ..."
          width="custom"
          height="custom"/>
</cwc2>
Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The MapSize tag has attributes from the Button Attributes and Popup Attributes groups. This means MapSize has access to the "TextButtons" and "PopUpCSS" Shared Resources. To learn about them, please refer to the appropriate attribute group section for details.

MapTitle

Parent Class:
Label Widgets
Description:
Displays the name of the map. The title comes form either the OGC context or MapServer map file loaded into your application.
Tag:

<CWC2 TYPE="MapTitle"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- MapTitle Attributes-->

    WIDGETCLASS="[string]"
    WIDGETSTYLE="[string]"/>

  
Attributes:
The MapTitle tag has attributes from the Base Attributes group, plus the following attributes:
WIDGETCLASS
Type: Widget Only
Options: "[string]", "NULL"
Call a CSS style class from the defined application CSS.
WIDGETSTYLE
Type: Widget Only
Options: "[string]", "NULL"
Define a CSS style within this attribute.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
None.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
In most cases this is all you need to define.

<cwc2 type="MapTitle"/>
    
Example 2. ADVANCED
If you want to define a specific CSS style for the output map title text, you can use the WIDGETSTYLE or WIDGETCLASS attributes.

<cwc2 type="MapTitle"
    widgetstyle="font-family:Ariel; font-size:14px;"/>

    
Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The type of attributes used by this widget determine what kind of Shared Resources the widget can use.

PanMap

Parent Class:
Navigation Widgets
Description:
Allow the user to drag the map image to recenter the map at a given location.
Tag:

<CWC2 TYPE="PanMap"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- PanMap (Navigation) Attributes -->

    CURSORTYPE="[string]"
    DEFAULT="[TRUE|FALSE]"
    MAPID="[string]"
    WIDGETSTYLE="[string]"


    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>
 </CWC2>
    
Attributes:
The PanMap tag has attributes from the Base Attributes and Button Attributes groups, plus the following attributes:
CURSORTYPE
Type: Widget Only
Options: "[string]", "AUTO"
Allow the cursor to change to a predefined cursor type when the tool is being used. The cursor types are dependent on what is available on your computer.
DEFAULT
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Control whether this widget is the default selected navigation tool.
MAPID
Type: Widget Only
Options: "[string]", "DEFAULT_MAP"
The ID of the map to which this widget should apply its navigation. This attribute becomes important when you have more than one map in your HTML interface template.
WIDGETSTYLE
Type: Widget Only
Options: "[string]", "NULL"
This is the CSS class to control the style of the pan image tag.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
Map Widget
A map widget must be present in the interface for the PanMap widget to function. This does not mean the button will not show up without a map, only that the button would be inactive.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
An image can define the PanMap button.

<cwc2 type="PanMap"
    visible="true"
    image="buttons/button_pan_1.png"/>

Example 2. ADVANCED
This example shows how the PanMap widget will use a button Shared Resource called "NavigationButtons".

<cwc2 type="PanMap"
    visible="true"
    imagetip="Pan Map"
    image="icons/pan_icon.png"
    styleresource="NavigationButtons">
        <image state="normal" />
        <image state="hover" />
        <image state="selected" />
</cwc2>

Example 3. ADVANCED
This PanMap example shows how the widget could be defined without using a Shared Resource. Note that this tool is linked to a group of button-based navigation widgets using the TOOLSET attribute. This means that if PanMap is selected, it will remain active until you select another tool within that tool group.

<cwc2 type="PanMap"
    visible="true"
    imagetip="Pan Map"
    toolset="Navigation"
    imagewidth="24"
    imageheight="24">
        <image state="normal"
            image="buttons/button_pan_1.png"/>
        <image state="hover"
            image="buttons/button_pan_2.png"/>
        <image state="selected"
            image="buttons/button_pan_3.png"/>
</cwc2>

Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The PanMap tag has attributes from Button Attributes group. This means PanMap has access to the "TextButtons" Shared Resource. To learn about this Shared Resource, please refer to the Button attribute group section for details.

Query

Parent Class:
Navigation Widgets
Description:
If a visible feature (point, line, polygon or raster) found in the map has accessible tabular information, the Query widget returns the query results in a tabular popup window.
Tag:

<CWC2 TYPE="Query"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- Query Attributes-->

    INCLUDEEMPTYRESULTS="[TRUE|FALSE]"
    MAXFEATURES="[1 < integer]"
    RADIUS="[1 < integer]"

    <!-- Navigation Attributes -->

    CURSORTYPE="[string]"
    DEFAULT="[TRUE|FALSE]"
    MAPID="[string]"
    WIDGETSTYLE="[string]"

    <!-- Popup Attribute Group -->

    MENUBAR => booleanattribute Object
    POPUPHEIGHT="[0 < integer]"
    POPUPSTYLERESOURCE="[string]"
    POPUPWIDTH="[0 < integer]"
    RESIZABLE="[TRUE|FALSE]"
    SCROLLBARS="[TRUE|FALSE]"
    STATUS="[TRUE|FALSE]"
    TOOLBAR="[TRUE|FALSE]"

    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>

<CWC2/>

    
Attributes:
The Query tag has attributes from the Base Attributes, Button Attributes, and Popup Attributes groups, plus the following attributes:
CURSORTYPE
Type: Widget Only
Options: "[string]", "AUTO"
Allow the cursor to change to a predefined cursor type when tool is being used. The cursor types are dependent on what is available on your computer.
DEFAULT
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Control whether this widget is the default selected navigation tool.
INCLUDEEMPTYRESULTS
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
If set to "TRUE", output a message when no search results are found.
MAPID
Type: Widget Only
Options: "[string]", "DEFAULT_MAP"
The ID of the map to which this widget should apply its query. This attribute becomes important when you have more than one map in your interface HTML template.
MAXFEATURES
Type: Widget Only
Options: "[1 < integer]", "5"
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 most should at least ignore it.
RADIUS
Type: Widget Only
Options: "[1 < integer]", "3"
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, although most should at least ignore it.
WIDGETSTYLE
Type: Widget Only
Options: "[string]", "NULL"
This is the CSS class to control the style of the pan image tag.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
Map Widget
A map widget must be present in the interface for this widget to find possible queriable map features.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
The radius of the query is set to 3 pixels and the number of features to be displayed in the popup table results is set to 5.

<cwc2 type="Query"
    visible="true"
    image="buttons/button_query_1.png"
    radius="3"
    maxfeatures="5"/>

Example 2. ADVANCED
This example shows how the Query widget will use a "TextButtons" Shared Resource called "NavigationButtons" with three possible image states.

<cwc2 type="Query"
    visible="true"
    imagetip="Identify Feature"
    image="icons/query_icon.png"
    styleresource="NavigationButtons"
    popupwidth="500"
    popupheight="600"
    radius="3"
    maxfeatures="5">
        <image state="normal" />
        <image state="hover" />
        <image state="selected" />
</cwc2>

Example 3. ADVANCED
This Query example shows how the widget could be defined without using a Shared Resource. Note that this tool is linked to a group of button-based navigation widgets using the TOOLSET attribute. This means that if Query is selected, it will remain active until you select another tool within that tool group.

<cwc2 type="Query"
    visible="true"
    imagetip="Identify Feature"
    toolset="Navigation"
    imagewidth="24"
    imageheight="24"
    popupwidth="500"
    popupheight="600"
    toolbar="false"
    status="false"
    menubar="false"
    radius="3"
    maxfeatures="5">
        <image state="normal"
            image="buttons/button_query_1.png"/>
        <image state="hover"
            image="buttons/button_query_2.png"/>
        <image state="selected"
            image="buttons/button_query_3.png"/>
</cwc2>

Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The Query tag has attributes from the Button Attributes and Popup Attributes groups. This means Query has access to the "TextButtons" and "PopUpCSS" Shared Resources. To learn about them, please refer to the appropriate attribute group section for details.

ScaleBar

Parent Class:
Label Widgets
Description:
Display a scalebar image for the current extents of the map view.
Tag:

<CWC2 TYPE="ScaleBar"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- ScaleBar Attributes-->

    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="[GIF|PNG|PNG24|JPEG|WBMP|PDF|SWF]"/>

  
Attributes:
The ScaleBar tag has attributes from the Base Attributes group, plus the following attributes:
WIDTH
Type: Widget Only
Options: "[0 < integer]", "200"
The width (in pixels) to draw the scalebar image.
HEIGHT
Type: Widget Only
Options: "[0 < integer]", "5"
The height (in pixels) to draw the scalebar image. Note that this includes the text labels.
INTERVALS
Type: Widget Only
Options: "[0 < integer]", "5"
The number of intervals to include in the scalebar.
UNITS
Type: Widget Only
Options: "[INCHES|FEET|MILES|METERS|KILOMETERS]", "KILOMETERS"
The units to draw the scalebar in.
COLOR
Type: Widget Only
Options: "[RRR GGG BBB]", "255,255,255" (white)
The color to draw the foreground of the scalebar with.
BACKGROUNDCOLOR
Type: Widget Only
Options: "[RRR GGG BBB]", "0,0,0" (black)
The background color to draw the scalebar with.
OUTLINECOLOR
Type: Widget Only
Options: "[RRR GGG BBB]", "0,0,0" (black)
The outline color to draw the scalebar with.
LABELCOLOR
Type: Widget Only
Options: "[RRR GGG BBB]", "0,0,0" (black)
The color to draw the labels with.
LABELSIZE
Type: Widget Only
Options: "[TINY|SMALL|MEDIUM|LARGE|GIANT]", "SMALL"
The size of the text to draw the labels with.
TRANSPARENT
Type: Widget Only
Options: "[TRUE|FALSE]", "TRUE"
Control the transparency of the scalebar image.
IMAGETYPE
Type: Widget Only
Options: "[GIF|PNG|PNG24|JPEG|WBMP|PDF|SWF]", "PNG"
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 transparently (e.g., PNG).
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
None.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
This is the simplest example of the "ScaleBar" Widget, because most of the scalebar attributes have default values.

<cwc2 type="ScaleBar"/>

    
Example 2. ADVANCED
Here is a how a configured ScaleBar widget would look.

<cwc2 type="Scalebar"
      units="MILES"
      visible="true"
      width="250"
      height="4"
      intervals="5"
      outlinecolor="0 0 0"
      color="102 102 102"/>

    
Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The type of attributes used by this widget determine what kind of Shared Resources the widget can use.

SharedResource

Parent Class:
Chameleon Core Widgets
Description:
SharedResource is an invisible widget that defines some set of values that are to be shared among one or more widgets. Shared Resources are used as a global placeholders for sets of common attributes from a widget or an attribute group. The attributes allowed in Shared Resources, and their individual formats/structures, are defined within the code for the individual widget or attribute group. Shared Resources help Chameleon application developers better manage all their different attribute sets.
Tag:

<CWC2 TYPE="SharedResource"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- Shared Resource Attributes-->

    ENABLEJS="[TRUE|FALSE]"
    NAME="[string]"/>

  
Attributes:
The SharedResource tag has attributes from the Base Attributes group, plus the following attributes:
ENABLEJS
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Enable outputting of the values in this Shared Resource as a JavaScript Shared Resource. There are strict formatting rules for maszContents in order to use ENABLEJS. Please see the comments in SharedResource.widget.php for formatting rules.
NAME
Type: Required
Options: "[string]"
Give the Shared Resource a name to help the widgets in the template find it. This name determines which attributes will be found in the Shared Resource and also defines the structure of the Shared Resource. Widgets often have defined reserved words to look for specific attribute packages within the Shared Resource. These reserved words include: "TextButtons", "PopUpCSS", "WaitImage", and "Projection".
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
None.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. WAITIMAGE
The example below represents the default named "WaitImage" Shared Resource. This Shared Resource holds a list of multilingual image that are displayed when an application is in the middle of an extended process. In this example, this Shared Resource contains English and French wait image attribute sets.

  <!-- WaitImage Shared Resource -->

<cwc2 type="SharedResource" name="WaitImage">
    <waitimage language="en-CA"
        waitimage="images/spinner.gif"
        waitimagewidth="216"
        waitimageheight="50"/>
    <waitimage language="fr-CA"
        waitimage="images/spinner_f.gif"
        waitimagewidth="216"
        waitimageheight="50"/>
</cwc2>

        
Example 1. TEXTBUTTONS
The example below represents the default named "TextButtons" Shared Resource. If a widget does not call a specific button style Shared Resource then the widget will use this button style if defined in the template.

<!-- Default button style for Text Buttons -->

<cwc2 type="SharedResource" name="TextButtons">
    <textbuttonbackgroundimage value=""/>
    <imagewidth value="120"/>
    <imageheight value="24"/>
    <textbuttonpadding value="0"/>
    <textbuttonnudge value="0"/>
    <labelcolor value="111111"/>
    <labelfont value="fonts/Vera.ttf"/>
    <labelalign value="left"/>
    <labelfontsize value="8"/>
    <labelantialias value="true"/>
    <usetextbuttoncache value="false"/>
    <textbuttoncolor value="f0f0f0"/>
    <textbuttonborder_topleft_image value="borders/border_tl_1.png"/>
    <textbuttonborder_top_image value="borders/border_t_1.png"/>
    <textbuttonborder_topright_image value="borders/border_tr_1.png"/>
    <textbuttonborder_right_image value="borders/border_r_1.png"/>
    <textbuttonborder_left_image value="borders/border_l_1.png"/>
    <textbuttonborder_bottomright_image value="borders/border_br_1.png"/>
    <textbuttonborder_bottom_image value="borders/border_b_1.png"/>
    <textbuttonborder_bottomleft_image value="borders/border_bl_1.png"/>
</cwc2>

        
Sample Applications:
These applications below uses the Shared Resource widget.
Shared Resources:
The type of attributes used by this widget determine what kind of Shared Resources the widget can use. Since this is the Shared Resource Widget cannot request itself. This means that no Shared Resource can call another Shared Resource.

UpdateMap

Parent Class:
Map Widgets
Description:
Allow the user to refresh the current page without performing any other navigation. This is useful for sending values from widgets that do not have some more direct form of communication, such as the Scale widget.
Tag:

<CWC2 TYPE="UpdateMap"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>

</CWC2>

  
Attributes:
The UpdateMap tag has attributes from the Base Attributes and Button Attributes groups.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
None.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
This is the simplest example of the UpdateMap widget.

<cwc2 type="UpdateMap"
    visible="true"
    image="buttons/button_update_1.png"/>

Example 2. ADVANCED
This example shows how the UpdateMap widget using the a "TextButtons" Shared Resource called with three possible image states. Also this button will contain a label "Redraw Map"> that will be written right on the button.

<cwc2 type="UpdateMap"
    visible="true"
    imagetip="Update Map With Current Selections"
    image="icons/icon_update.png"
    label="Redraw Map"
    styleresource="TextButtons">
        <image state="normal" />
        <image state="hover" />
        <image state="selected" />
</cwc2>

Example 3. ADVANCED
This UpdateMap widget example shows how the widget could be defined without using a Shared Resource.

<cwc2 type="UpdateMap"
    visible="true"
    imagetip="Update Map With Current Selections"
    imagewidth="24"
    imageheight="24">
        <image state="normal"
            image="buttons/button_update_1.png"/>
        <image state="hover"
            image="buttons/button_update_2.png"/>
        <image state="selected"
            image="buttons/button_update_3.png"/>
</cwc2>

      
Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The UpdateMap tag has attributes from Button Attributes group. This means UpdateMap has access to the "TextButtons" Shared Resource. To learn more about this Shared Resource, please refer to the appropriate attribute group section for details.

ZoomAllLayers

Parent Class:
Navigation Widgets
Description:
Allow the user to zoom to the full extents of the currently loaded map. This extent information is located in either the MapServer mapfile (*.map) or the OGC Context (*.xml) file.
Tag:

<CWC2 TYPE="ZoomAllLayers"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- ZoomAllLayers (Navigation) Attributes -->

    CURSORTYPE="[string]"
    DEFAULT="[TRUE|FALSE]"
    MAPID="[string]"
    WIDGETSTYLE="[string]"


    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>
 </CWC2>

    
Attributes:
The ZoomAllLayers tag has attributes from the Base Attributes and Button Attributes groups, plus the following attributes:
CURSORTYPE
Type: Widget Only
Options: "[string]", "AUTO"
Allow the cursor to change to a predefined cursor type when tool is being used. The cursor types are dependent on what is available on your computer.
DEFAULT
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Control whether this widget is the default selected navigation tool.
MAPID
Type: Widget Only
Options: "[string]", "DEFAULT_MAP"
The ID of the map to which this widget should apply its navigation. This attribute becomes important when you have more than one map in your interface HTML template.
WIDGETSTYLE
Type: Widget Only
Options: "[string]", "NULL"
This is the CSS class to control the style of the pan image tag.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
Map Widget
A map widget must be present in the interface for the ZoomAllLayers widget to function. This does not mean the button will not show up, only that the button would be inactive.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
An image will define the ZoomAllLayers button.

<cwc2 type="ZoomAllLayers"
    visible="true"
    image="buttons/button_zoomfull_1.png"/>

Example 2. ADVANCED
This example shows how the ZoomAllLayers widget will use a "TextButtons" Shared Resource called "NavigationButtons".

<cwc2 type="ZoomAllLayers"
    visible="true"
    imagetip="Zoom to Full Extents"
    image="icons/pan_zoomfull.png"
    styleresource="NavigationButtons">
        <image state="normal" />
        <image state="hover" />
        <image state="selected" />
</cwc2>

Example 3. ADVANCED
This ZoomAllLayers example shows how the widget could be defined without using a Shared Resource. Note that this tool is linked to a group of button-based navigation widgets using the TOOLSET attribute. This means that if ZoomAllLayers is selected, it will remain active until you select another tool within that tool group.

<cwc2 type="ZoomAllLayers"
    visible="true"
    imagetip="Zoom to Full Extents"
    toolset="Navigation"
    imagewidth="24"
    imageheight="24">
        <image state="normal"
            image="buttons/button_zoomfull_1.png"/>
        <image state="hover"
            image="buttons/button_zoomfull_2.png"/>
        <image state="selected"
            image="buttons/button_zoomfull_3.png"/>
</cwc2>

Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The ZoomAllLayers tag has attributes from the Button Attributes group. This means ZoomAllLayers has access to the "TextButtons" Shared Resource. To learn about this Shared Resource, please refer to the Button attribute group section for details.

ZoomIn

Parent Class:
Navigation Widgets
Description:
Allow 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"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- ZoomIn (Navigation) Attributes -->

    CURSORTYPE="[string]"
    DEFAULT="[TRUE|FALSE]"
    MAPID="[string]"
    WIDGETSTYLE="[string]"
    MINIMUMZOOMRECTANGLE="[0 < integer]"

    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>
 </CWC2>

    
Attributes:
The ZoomIn tag has attributes from the Base Attributes and Button Attributes groups, plus the following attributes:
CURSORTYPE
Type: Widget Only
Options: "[string]", "AUTO"
Allow the cursor to change to a predefined cursor type when tool is being used. The cursor types are dependent on what is available on your computer.
DEFAULT
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Control whether this widget is the default selected navigation tool.
MAPID
Type: Widget Only
Options: "[string]", "DEFAULT_MAP"
The ID of the map to which this widget should apply its navigation. This attribute becomes important when you have more than one map in your HTML interface template.
MINIMUMZOOMRECTANGLE
Type: Widget Only
Options: "[0 < integer]", "5"
The minimum zooming rectangle that will still be considered a rectangle. Rectangles smaller than this will be considered a point zoom.
WIDGETSTYLE
Type: Widget Only
Options: "[string]", "NULL"
This is the CSS class to control the style of the ZoomIn image tag.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
Map Widget
A map widget must be present in the interface for the ZoomIn widget to function. This does not mean the button will not show up, only that the button would be inactive.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
An image will define the ZoomIn button.

<cwc2 type="ZoomIn"
    visible="true"
    image="buttons/button_zoomin_1.png"/>

Example 2. ADVANCED
This example shows how the ZoomIn widget will use a "TextButtons" Shared Resource called "NavigationButtons".

<cwc2 type="ZoomIn"
    visible="true"
    imagetip="Zoom Into Selected Point or Region"
    image="icons/pan_zoomin.png"
    styleresource="NavigationButtons">
        <image state="normal"/>
        <image state="hover"/>
        <image state="selected"/>
</cwc2>

Example 3. ADVANCED
This ZoomIn example shows how the widget could be defined without using a Shared Resource. Note that this tool is linked to a group of button-based navigation widgets using the TOOLSET attribute. This means that if ZoomIn is selected, it will remain active until you select another tool within that tool group.

<cwc2 type="ZoomIn"
    visible="true"
    imagetip="Zoom Into Selected Point or Region"
    toolset="Navigation"
    imagewidth="24"
    imageheight="24">
        <image state="normal"
            image="buttons/button_zoomin_1.png"/>
        <image state="hover"
            image="buttons/button_zoomin_2.png"/>
        <image state="selected"
            image="buttons/button_zoomin_3.png"/>
</cwc2>

Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The ZoomIn tag has attributes from Button Attributes group. This means ZoomIn has access to the "TextButtons" Shared Resources. To learn about this Shared Resource, please refer to the Button attribute group section for details.

ZoomOut

Parent Class:
Navigation Widgets
Description:
Allows the user to zoom out of the map from a given point using the current zoom factor.
Tag:

<CWC2 TYPE="ZoomOut"
    ENABLED="[TRUE|FALSE]"
    FORMINDEX="[0 < integer]"
    VISIBLE="[TRUE|FALSE]"

    <!-- ZoomOut (Navigation) Attributes -->

    CURSORTYPE="[string]"
    DEFAULT="[TRUE|FALSE]"
    MAPID="[string]"
    WIDGETSTYLE="[string]"


    <!-- Button Attribute Group-->

    BACKGROUNDIMAGE="[path]"
    DEFAULT="[TRUE|FALSE]"
    IMAGE="[path]"
    IMAGEHEIGHT="[integer]"
    IMAGETIP="[string]"
    IMAGEWIDTH="[integer]"
    LABELALIGN="[LEFT|CENTER|RIGHT]"
    LABELANTIALIAS="[TRUE|FALSE]"
    LABELCOLOR="[#RRGGBB]"
    LABELFONT="[string]"
    LABELFONTSIZE="[0 < integer]"
    ONCLICK="[string]"
    STYLERESOURCE="[string]"
    TEXTBUTTONBORDER="[path]"
    TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_LEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOP_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"
    TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"
    TEXTBUTTONCOLOR="[#RRGGBB]"
    TEXTBUTTONNUDGE="[integer]"
    TEXTBUTTONPADDING="[0 < integer]"
    TOOLSET="[string]"
    USETEXTBUTTONCACHE="[TRUE|FALSE]">

    <!-- Button Subtag Group -->

    <IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"
         IMAGE="[path]"/>
 </CWC2>

    
Attributes:
The ZoomOut tag has attributes from the Base Attributes and Button Attributes groups, plus the following attributes:
CURSORTYPE
Type: Widget Only
Options: "[string]", "AUTO"
Allow the cursor to change to a predefined cursor type when tool is being used. The Cursor Types are dependent on what is available on your computer.
DEFAULT
Type: Widget Only
Options: "[TRUE|FALSE]", "FALSE"
Control whether this widget is the default selected navigation tool.
MAPID
Type: Widget Only
Options: "[string]", "DEFAULT_MAP"
The ID of the map to which this widget should apply its navigation. This attribute becomes important when you have more than one map in your interface HTML template.
WIDGETSTYLE
Type: Widget Only
Options: "[string]", "NULL"
This is the CSS class to control the style of the pan image tag.
Dependencies:
In order for the widget to function, the following Chameleon features may be required.
Map Widget
A map widget must be present in the interface for the ZoomOut widget to function. This does not mean the button will not show up, only that the button would be inactive.
Examples:
Below are examples of Chameleon widget tags that could be placed into an HTML template with little to no attribute value changes.
Example 1. SIMPLE
An image will define the ZoomOut button.

<cwc2 type="ZoomOut"
    visible="true"
    image="buttons/button_zoomout_1.png"/>

Example 2. ADVANCED
This example shows how the ZoomOut widget will use a "TextButtons" Shared Resource called "NavigationButtons".

<cwc2 type="ZoomOut"
    visible="true"
    imagetip="Zoom Out"
    image="icons/pan_zoomout.png"
    styleresource="NavigationButtons">
        <image state="normal" />
        <image state="hover" />
        <image state="selected" />
</cwc2>

Example 3. ADVANCED
This ZoomOut example shows how the widget could be defined without using a Shared Resource. Note that this tool is linked to a group of button-based navigation widgets using the TOOLSET attribute. This means that if ZoomOut is selected, it will remain active until you select another tool within that tool group.

<cwc2 type="ZoomOut"
    visible="true"
    imagetip="Zoom Out"
    toolset="Navigation"
    imagewidth="24"
    imageheight="24">
        <image state="normal"
            image="buttons/button_zoomout_1.png"/>
        <image state="hover"
            image="buttons/button_zoomout_2.png"/>
        <image state="selected"
            image="buttons/button_zoomout_3.png"/>
</cwc2>

Sample Applications:
See this widget in action! Here are some applications that use this widget.
Shared Resources:
The ZoomOut tag has attributes from the Button Attributes group. This means ZoomOut has access to the "TextButtons" Shared Resources. To learn about this Shared Resource, please refer to the Button attribute group section for details.