en-ca 1999-12-31 $id:$ Doc_Builder DM Solutions Group Inc. chameleon@lists.maptools.org Paul Spencer DM Solutions Group Inc. chameleon@lists.maptools.org Christopher R. Thorne DM Solutions Group Inc. chameleon@lists.maptools.org ZoomFactor TBD Navigation Widgets 2.0 2005-01-10 TECHRELEASE Paul Spencer DM Solutions Group Inc. chameleon@lists.maptools.org The ZoomFactor widget is used to enter a zoom factor that is used when the user zooms in at a point. This factor is ignored if the user zooms to a rectangular region. The widget contains the ability to restrict the zoom factor to a range of values. The ZoomFactor widget provides the capability for the user to determine the amount to zoom in or out on a single click. When zooming in, the resulting view is 1/[zoom factor] times zoomed in. When zooming out, the resulting view is [zoom factor] times zoomed out. To enter a new zoom factor, erase the existing value and type a new value. The new value is used the next time a point zoom in or zoom out is performed. Zoom factors are integer values. The ZoomFactor widget is represented by a labeled HTML INPUT box. By default, both the minimum and default zoom factor settings are set to 2. <CWC2 TYPE="ZoomFactor" ENABLED="[TRUE|FALSE]" FORMINDEX="[0 < integer]" VISIBLE="[TRUE|FALSE]" <!-- ZoomFactor Attributes --> DEFAULTFACTOR ="[integer]" MAXIMUMFACTOR ="[integer]" MINIMUMFACTOR ="[integer]" TEXTFIELDSIZE ="[integer]" <!-- Label Attribute Group--> LABEL="[string]" LABELCLASS="[string]" LABELHALIGN="[LEFT|CENTER|RIGHT]" LABELPOSITION="[0 < integer < 8]" LABELSTYLE="[path]" LABELVALIGN="[TOP|MIDDLE|BOTTOM]"/> The following example is the typical configuration for this widget tag without any label styling. <cwc2 type="ZoomFactor" visible="true" defaultfactor="2" minimumfactor="2" label="Zoom Factor" textfieldsize="2" /> The following example contains a label class to style the zoom factor label. <cwc2 type="ZoomFactor" visible="true" defaultfactor="2" minimumfactor="2" label="Zoom Factor" textfieldsize="2" labelclass="label"/> Hawaii Demo www.mapsherpa.com/hawaii2/ The Hawaii Demo uses the latest 1.99 Chameleon version. Base Label DEFAULTFACTOR integer Widget Only 2 2 2147483647 The default zoom factor to use. MAXIMUMFACTOR integer Widget Only NULL 2 2147483647 The maximum zoom factor. The default is no maximum. MINIMUMFACTOR integer Widget Only 2 2 2147483647 The minimum zoom factor. The default is 2. TEXTFIELDSIZE integer Widget Only 2 1 2147483647 The size (in characters) of the HTML INPUT text box. The default is 2. changeZoomFactor Private Callback function for handling the user changing the zoom factor. (Used for validation.) obj object true The HTML or JavaScript object that contains the new zoom factor. validateInteger Private Validate an integer value. nValue integer true