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 ZoomOut TBD Navigation Widgets 2.0 2005-01-10 TECHRELEASE Paul Spencer DM Solutions Group Inc. chameleon@lists.maptools.org The ZoomOut widget is used to zoom out on the map image using a single point click. The widget uses a default zoom factor of 2 unless there is a ZoomFactor widget in the application, in which case it uses the value set by the ZoomFactor widget. When zooming out, the extents in both the horizontal and vertical direction are modified by the zoom factor. For a zoom factor of 2, this results in viewing a geographical area approximately 4 times larger (2 times larger in each dimension). When zooming out, the user may see features appear or disappear due to scale constraints on layers in the map file or Context file. Also, the new view extents may be modified by other restrictions, such as the maximum scale in the MapDHTML widget or application-defined maximum extents, resulting in less of a zoom than the user would have otherwise expected. To avoid confusion, the ZoomOut widget should be grouped in a toolset with other navigation tools. Normally, this toolset is called "Navigation" A map widget must be present in the interface for the ZoomOut widget to function. This does not mean that without a map the button does not show up, only that the button is inactive. The ZoomOut widget tag has attributes from the Button Attributes Group. This means the ZoomOut widget has access to the Style Shared Resources. To learn about this Shared Resource, please refer to the Button Attribute Group section for details. The ZoomOut widget provides the capability to zoom out from the current map view. To use it, click the Zoom Out button and then click the map. The map is recentered at the selected point and zoomed out by the user-defined Zoom Factor. You must select the ZoomOut button to activate this navigation tool before proceeding to the map. If the button is a part of a button toolset, then the functionality of this button remains active until another button is selected in the same toolset. Once the Zoom Out button is selected, the user can point and click on the map and the map zooms out based on the currently set zoom factor (default is "2"). The map then recenters on the "POINT of interest" and increases the scale, meaning the map shows more area and less detail. <CWC2 TYPE="ZoomOut" ENABLED="[TRUE|FALSE]" FORMINDEX="[0 < integer]" VISIBLE="[TRUE|FALSE]" <!-- 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> An image can define the ZoomOut button. <cwc2 type="ZoomOut" visible="true" image="buttons/button_zoomout_1.png"/> The following example shows how the ZoomOut widget uses a Style 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> The following 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 remains active until another tool within that tool group is selected. <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> Hawaii Demo www.mapsherpa.com/hawaii2/ The Hawaii Demo uses the latest 1.99 Chameleon version. Base Button NavTool NAV_CMD string The last command that was used to interact with the map. For this widget, it is set to ZOOM_OUT. NAV_ALLOW_RECTANGLE boolean Track whether the current navigation tool uses a rubber-banding box or not. For this widget, it is set to FALSE. NavSetActiveTool Private Set the active navigation tool for a particular group of tools. oButton object true This is the JavaScript button object. aVals array true Array of parameters that defines the navigation tool. The first element is the tool number. The second element is the tool name. The third element is boolean and determines if rectangle mode is enabled or not. The fourth element controls automatic submission of the page after navigation. The fifth element is a string that define the cursor type.