English (en-ca) 2005-01-07 $id: $ Doc_Builder DM Solutions Group Inc. chameleon@lists.maptools.org Christopher R. Thorne DM Solutions Group Inc. chameleon@lists.maptools.org Paul Spencer DM Solutions Group Inc. chameleon@lists.maptools.org Extent TBD Label Widget 2.0 2005-01-10 TECHRELEASE Paul Spencer DM Solutions Group Inc. chameleon@lists.maptools.org The Extent widget is used to display one of the extents of the map currently displayed in the application, in the geographic coordinates of the map. The MapServer file (*.map) and/or the OGC Context file (*.cml) must have a defined projection. To obtain a valid projection, you should use EPSG projection codes. It is important to define the projection so that the extent values of the map have valid units (e.g., decimal degrees, meters, etc.), so that map becomes geospatially significant within the application map view. In a Chameleon mapping application, the map view is interactive by nature. The Extent widget helps dynamically update the extents of the map to reflect the current map view. The extents may also change dynamically when there is a change in projection. The Extent widget displays one of the coordinates (minimum X, minimum Y, maximum X, or maximum Y) of the rectangle that describes the visible area of the map. The extents are displayed in the units of the current projection. There are four possible extent labels for a map. These extent labels could be placed all together near the MapUnits, ProjectionLabel, and other information widgets, or in pairs at two opposite corners (i.e., Min-X, Min-Y (lower left corner) vs. Max-X, Max-Y (upper right corner)). <CWC2 TYPE="Extent" ENABLED="[TRUE|FALSE]" FORMINDEX="[0 < integer]" VISIBLE="[TRUE|FALSE]" <!-- Extent Attributes --> EXTENT ="[MINX|MINY|MAXX|MAXY]" WIDGETCLASS ="[string]" TEXTFIELDSIZE ="[integer]" /> The basic widget definition below outputs the current minimum Y extent - the bottom most horizontal line coordinate value found in the current map view. <cwc2 type="Extent" extent="miny" /> The example below shows how a descriptive label, along with label styling, can be added to the Min-X value. In this case, the label is "Left:", which represents the far left vertical grid line coordinate of the current map view. <cwc2 type="Extent" label="Left: " visible="true" extent="minx" labelposition="8" labelvalign="middle" labelclass="label" widgetclass="inputBox"/> Hawaii Demo http://www.mapsherpa.com/hawaii2/ The Hawaii Demo uses the latest 1.99 Chameleon version. Base Label EXTENT string Required MINX MINY MAXX MAXY The extent to display. WIDGETCLASS string Widget Only CWCExtentWidgetClass The CSS class to control the style of the extent text. TEXTFIELDSIZE integer Widget Only 20 pixels 0 2147483647 The size (in characters) to make the extent widget in JSAPI mode. sid unknown string Private Private string false unknown JSAPI function calls for this widget are outlined here. string false