NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/Chameleon/trunk/Chameleon/ZoomAllLayers/ZoomAllLayers.en-ca.doc.xml

Revision 13 (checked in by jcleary, 17 years ago)

Latest Chameleon code checkout from previous repository

Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ca:widgetdoc xmlns:ca="http://localhost/chameleon/utils/xml/schemas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost/chameleon/utils/xml/schemas ..\..\..\utils\xml\schemas\chameleon.xsd">
3   <ca:docinfo>
4     <ca:language>
5       <ca:value>en-ca</ca:value>
6     </ca:language>
7     <ca:docbuilddate>
8       <ca:value>1999-12-31</ca:value>
9     </ca:docbuilddate>
10     <ca:docversion>
11       <ca:value>$id:$</ca:value>
12     </ca:docversion>
13     <ca:authors>
14       <ca:person>
15         <ca:name>Doc_Builder</ca:name>
16         <ca:company>DM Solutions Group Inc.</ca:company>
17         <ca:contact>chameleon@lists.maptools.org</ca:contact>
18       </ca:person>
19     </ca:authors>
20     <ca:editors>
21       <ca:person>
22         <ca:name>Paul Spencer</ca:name>
23         <ca:company>DM Solutions Group Inc.</ca:company>
24         <ca:contact>chameleon@lists.maptools.org</ca:contact>
25       </ca:person>
26       <ca:person>
27         <ca:name>Christopher R. Thorne</ca:name>
28         <ca:company>DM Solutions Group Inc.</ca:company>
29         <ca:contact>chameleon@lists.maptools.org</ca:contact>
30       </ca:person>
31     </ca:editors>
32   </ca:docinfo>
33   <ca:identification>
34     <ca:name>
35       <ca:value>ZoomAllLayers</ca:value>
36     </ca:name>
37     <ca:chameleonpack>
38       <ca:value>TBD</ca:value>
39     </ca:chameleonpack>
40     <ca:parentgroup>
41       <ca:value>Navigation Widgets</ca:value>
42     </ca:parentgroup>
43     <ca:version>
44       <ca:value>2.0</ca:value>
45     </ca:version>
46     <ca:releasedate>
47       <ca:value>2005-01-10</ca:value>
48     </ca:releasedate>
49     <ca:maturitylevel>
50       <ca:value>TECHRELEASE</ca:value>
51     </ca:maturitylevel>
52     <ca:developers>
53       <ca:person>
54         <ca:name>Paul Spencer</ca:name>
55         <ca:company>DM Solutions Group Inc.</ca:company>
56         <ca:contact>chameleon@lists.maptools.org</ca:contact>
57       </ca:person>
58     </ca:developers>
59   </ca:identification>
60   <ca:descriptions>
61     <ca:description>
62       <ca:paras>
63         <ca:para>The ZoomAllLayers widget allows the user to zoom to the full extents of the currently loaded map. This extent information is located in either the MapServer map file (*.map) or the OGC Context (*.xml) file.</ca:para>
64         <ca:para>By default, Chameleon reads the initial extents of the application from the map file or Context file and preserves them for use by this widget.  Technically, these extents are stored as metadata inside the Chameleon MAP object. (Even if a Context is used, Chameleon works with a MAP file internally).  It is possible to manually set this metadata in the map file so that Chameleon uses a (possibly) different set of extents as the "full extents" rather than the starting extents of the application.  To do this, add the following to the metadata of the WEB object in the map file:</ca:para>
65         <ca:para>"original_projection" "init=epsg:42304"</ca:para>
66         <ca:para>"original_extents" "-2594561,-712631,3467361,3840000"</ca:para>
67         <ca:para>Make sure to use the appropriate projection and extents for the application.  Now, when starting the application, the initial view of the map is defined by the MAP EXTENTS, but when the user clicks the ZoomAllLayers widget, they are zoomed to these "original_extents" instead of the initial extents.</ca:para>
68         <ca:para>Note that this widget is somewhat misnamed.  Remote WMS layers often do not provide their full extent information (or it is incorrect), so when working with WMS layers, it is not possible to automatically determine the full extents of all layers.  Even when working with local data, this is difficult due to differing projections.  A conscious decision was made to allow the application designer to determine what the "full extents" of the application would be.</ca:para>
69         <ca:para>See http://mapserver.gis.umn.edu for more information on map file structure, metadata, and extents.</ca:para>
70       </ca:paras>
71     </ca:description>
72     <ca:techrequirements title="Technical Requirements">
73       <ca:paras title="Map Full Extents">
74         <ca:para>The full extents that are shown when the application is first loaded are defined in the map file. This full extents value can be modified to equal any map view. When changing the projection of a map, the extents must also change to the correct units and new spatial reference value. </ca:para>
75       </ca:paras>
76     </ca:techrequirements>   
77  
78     <ca:dependancies>
79       <ca:dependancy type="Widget" title="Map Widget">
80         <ca:para>A map widget must be present in the interface for the ZoomAllLayers widget to function. This does not mean that without a map no button shows up, only that the button would be inactive.</ca:para>
81       </ca:dependancy>
82     </ca:dependancies>
83     <ca:sharedresources>
84       <ca:paras title="StyleResource">
85         <ca:para>The ZoomAllLayers tag has attributes from the Button Attributes Group. This means the ZoomAllLayers widget has access to the Style Shared Resource. To learn about this Shared Resource, please refer to the Button Attribute Group section for details. </ca:para>
86       </ca:paras>
87     </ca:sharedresources>
88     <ca:embeddedhelp>
89       <ca:paras>
90         <ca:para>This widget provides the capability to zoom the map view  to the original extents defined by the application. To use it, simply click the Zoom  To Full Extents button.</ca:para>
91       </ca:paras>
92     </ca:embeddedhelp>
93     <ca:guinotes title="Interface Functionality">
94       <ca:guinote type="Button" title="TOOLSET not Available">
95         <ca:para>Even though the ZoomAllLayers widget is a navigational widget and a button, it should not (and in fact cannot) be added to a toolset.  The </ca:para>
96       </ca:guinote>         
97     </ca:guinotes>
98   </ca:descriptions>
99   <ca:tagstructures>
100     <ca:tagstructure title="Widget Syntax">
101       <ca:code>
102         <ca:codeblock bold="true">
103           <ca:line>&lt;CWC2 TYPE="ZoomAllLayers"</ca:line>
104         </ca:codeblock>
105         <ca:codeblock bold="false">
106           <ca:line>   ENABLED="[TRUE|FALSE]"</ca:line>
107           <ca:line>   FORMINDEX="[0 &lt; integer]"</ca:line>
108           <ca:line>   VISIBLE="[TRUE|FALSE]"</ca:line>
109           <ca:line/>
110           <ca:line>   &lt;!-- Navigation Attributes --&gt;</ca:line>
111           <ca:line/>
112           <ca:line>   CURSORTYPE="[string]"</ca:line>
113           <ca:line>   DEFAULT="[TRUE|FALSE]"</ca:line>
114           <ca:line>   MAPID="[string]"</ca:line>
115           <ca:line>   WIDGETSTYLE="[string]"</ca:line>
116           <ca:line/>
117           <ca:line>   &lt;!-- Button Attribute Group--&gt;</ca:line>
118           <ca:line/>
119           <ca:line>   BACKGROUNDIMAGE="[path]"</ca:line>
120           <ca:line>   DEFAULT="[TRUE|FALSE]"</ca:line>
121           <ca:line>   IMAGE="[path]"</ca:line>
122           <ca:line>   IMAGEHEIGHT="[integer]"</ca:line>
123           <ca:line>   IMAGETIP="[string]"</ca:line>
124           <ca:line>   IMAGEWIDTH="[integer]"</ca:line>
125           <ca:line>   LABELALIGN="[LEFT|CENTER|RIGHT]"</ca:line>
126           <ca:line>   LABELANTIALIAS="[TRUE|FALSE]"</ca:line>
127           <ca:line>   LABELCOLOR="[#RRGGBB]"</ca:line>
128           <ca:line>   LABELFONT="[string]"</ca:line>
129           <ca:line>   LABELFONTSIZE="[0 &lt; integer]"</ca:line>
130           <ca:line>   ONCLICK="[string]"</ca:line>
131           <ca:line>   STYLERESOURCE="[string]"</ca:line>
132           <ca:line>   TEXTBUTTONBORDER="[path]"</ca:line>
133           <ca:line>   TEXTBUTTONBORDER_BOTTOM_IMAGE="[path]"</ca:line>
134           <ca:line>   TEXTBUTTONBORDER_BOTTOMLEFT_IMAGE="[path]"</ca:line>
135           <ca:line>   TEXTBUTTONBORDER_BOTTOMRIGHT_IMAGE="[path]"</ca:line>
136           <ca:line>   TEXTBUTTONBORDER_LEFT_IMAGE="[path]"</ca:line>
137           <ca:line>   TEXTBUTTONBORDER_RIGHT_IMAGE="[path]"</ca:line>
138           <ca:line>   TEXTBUTTONBORDER_TOP_IMAGE="[path]"</ca:line>
139           <ca:line>   TEXTBUTTONBORDER_TOPLEFT_IMAGE="[path]"</ca:line>
140           <ca:line>   TEXTBUTTONBORDER_TOPRIGHT_IMAGE="[path]"</ca:line>
141           <ca:line>   TEXTBUTTONCOLOR="[#RRGGBB]"</ca:line>
142           <ca:line>   TEXTBUTTONNUDGE="[integer]"</ca:line>
143           <ca:line>   TEXTBUTTONPADDING="[0 &lt; integer]"</ca:line>
144           <ca:line>   TOOLSET="[string]"</ca:line>
145           <ca:line>   USETEXTBUTTONCACHE="[TRUE|FALSE]"&gt;</ca:line>
146           <ca:line/>
147           <ca:line>      &lt;!-- Button Subtag Group --&gt;</ca:line>
148           <ca:line/>
149           <ca:line>      &lt;IMAGE STATE="[NORMAL|SELECTED|HOVER|DISABLED]"</ca:line>
150           <ca:line>         IMAGE="[path]"/&gt;</ca:line>
151         </ca:codeblock>
152         <ca:codeblock bold="true">
153           <ca:line>&lt;/CWC2&gt;</ca:line>
154         </ca:codeblock>
155       </ca:code>
156     </ca:tagstructure>
157   </ca:tagstructures>
158   <ca:examples>
159     <ca:widgetexamples>
160       <ca:example title="Example #1: Simple">
161         <ca:description>The following example demonstrates a typical minimal use of the  the ZoomAllLayers button.</ca:description>
162         <ca:code>
163           <ca:codeblock bold="false">
164             <ca:line>&lt;cwc2 type="ZoomAllLayers"</ca:line>
165             <ca:line>   visible="true"</ca:line>
166             <ca:line>   image="buttons/button_zoomfull_1.png"/&gt;</ca:line>
167           </ca:codeblock>
168         </ca:code>
169       </ca:example>
170       <ca:example title="Example #2: Advanced">
171         <ca:description>The following example shows how the ZoomAllLayers widget uses a Style Shared Resource called "NavigationButtons".</ca:description>
172         <ca:code>
173           <ca:codeblock bold="false">
174             <ca:line>&lt;cwc2 type="ZoomAllLayers"</ca:line>
175             <ca:line>   visible="true"</ca:line>
176             <ca:line>   imagetip="Zoom to Full Extents"</ca:line>
177             <ca:line>   image="icons/pan_zoomfull.png"</ca:line>
178             <ca:line>   styleresource="NavigationButtons"&gt;</ca:line>
179             <ca:line>      &lt;image state="normal" /&gt;</ca:line>
180             <ca:line>      &lt;image state="hover" /&gt;</ca:line>
181             <ca:line>      &lt;image state="selected" /&gt;</ca:line>
182             <ca:line>&lt;/cwc2&gt;</ca:line>
183           </ca:codeblock>
184         </ca:code>
185       </ca:example>
186       <ca:example title="Example #3: Advanced">
187         <ca:description>The following 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 remains active until another tool is selected within that tool group.</ca:description>
188         <ca:code>
189           <ca:codeblock bold="false">
190             <ca:line>&lt;cwc2 type="ZoomAllLayers"</ca:line>
191             <ca:line>   visible="true"</ca:line>
192             <ca:line>   imagetip="Zoom to Full Extents"</ca:line>
193             <ca:line>   toolset="Navigation"</ca:line>
194             <ca:line>   imagewidth="24"</ca:line>
195             <ca:line>   imageheight="24"&gt;</ca:line>
196             <ca:line>      &lt;image state="normal"</ca:line>
197             <ca:line>         image="buttons/button_zoomfull_1.png"/&gt;</ca:line>
198             <ca:line>      &lt;image state="hover"</ca:line>
199             <ca:line>         image="buttons/button_zoomfull_2.png"/&gt;</ca:line>
200             <ca:line>      &lt;image state="selected"</ca:line>
201             <ca:line>         image="buttons/button_zoomfull_3.png"/&gt;</ca:line>
202             <ca:line>&lt;/cwc2&gt;</ca:line>
203           </ca:codeblock>
204         </ca:code>
205       </ca:example>
206     </ca:widgetexamples>
207     <ca:sampleapps>
208       <ca:sampleapp>
209         <ca:name>Hawaii Demo</ca:name>
210         <ca:appurl>www.mapsherpa.com/hawaii2/</ca:appurl>
211         <ca:description>The Hawaii Demo uses the latest 1.99 Chameleon version.</ca:description>
212       </ca:sampleapp>
213     </ca:sampleapps>
214     <ca:scriptexamples/>
215   </ca:examples>
216   <ca:attributegroups>
217     <ca:attributegroup>
218       <ca:name>Base</ca:name>
219       <ca:name>Button</ca:name>
220       <ca:name>NavTool</ca:name>
221     </ca:attributegroup>
222   </ca:attributegroups>
223   <ca:formelements>
224     <ca:formelement>
225       <ca:name>NAV_CMD</ca:name>
226       <ca:type>
227         <ca:value>string</ca:value>
228       </ca:type>
229       <ca:description>The last command that was used to interact with the map.  This is set to ZOOM_ALL for this widget.</ca:description>
230     </ca:formelement>
231     <ca:formelement>
232       <ca:name>NAV_ALLOW_RECTANGLE</ca:name>
233       <ca:type>
234         <ca:value>boolean</ca:value>
235       </ca:type>
236       <ca:description>Tracks whether the current navigation tool uses a rubber-banding box or not.</ca:description>
237     </ca:formelement>
238   </ca:formelements>
239   <ca:jsfunctions>
240     <ca:jsfunction>
241       <ca:name>NavSetActiveTool</ca:name>
242       <ca:scope>
243         <ca:value>Private</ca:value>
244       </ca:scope>
245       <ca:description>Set the active navigation tool for a particular group of tools.</ca:description>
246       <ca:parameters>
247         <ca:parameter>
248           <ca:name>oButton</ca:name>
249           <ca:type>
250             <ca:value>object</ca:value>
251           </ca:type>
252           <ca:required>
253             <ca:value>true</ca:value>
254           </ca:required>
255           <ca:description>This is the JavaScript button object.</ca:description>
256         </ca:parameter>
257         <ca:parameter>
258           <ca:name>aVals</ca:name>
259           <ca:type>
260             <ca:value>array</ca:value>
261           </ca:type>
262           <ca:required>
263             <ca:value>true</ca:value>
264           </ca:required>
265           <ca:description>Array of parameters that define 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.</ca:description>
266         </ca:parameter>
267       </ca:parameters>
268     </ca:jsfunction>
269   </ca:jsfunctions>
270 </ca:widgetdoc>
Note: See TracBrowser for help on using the browser.