[Chameleon] Query Widget returns too much information.
Normand Savard
nsavard at mapgears.com
Mon Aug 13 14:06:19 EDT 2007
LITTLE Nelson wrote:
>Hello Chameleons!
>
>I am using the Query Widget but I find that when I query an item the
>popup results windows displays values for every attribute for the
>item(s) queried.
>
>In my map file I have defined the attributes that should be returned in
>the "RESULT_FIELDS" for the layer being queried. I would expect that the
>query widget only returned the values for the attributes defined in
>"RESULT_FIELDS".
>
>Can anyone offer any help?
>
>
>
Nelson,
To limit the number of attributes displayed you have two choices. You
can add the HEADER keyword in the proper layer section or your can use
the RESULTFIELDSMETADATA Query widget attribute.
First with the HEADER keyword you have to write something like this in
the map file:
*To use with Map->Layer->Header
* insert in the mapfile at the specified layer a header tag like
* HEADER
"AREA^|PERIMETER^|POPPLACE_^|POPPLACE_I^|UNIQUE_KEY^Code|NAME^Name|NAME_E^|NAME_F^|REG_CODE^|NTS50^|LAT^|LONG^|SGC_CODE^|CAPITAL^|POP_RANGE^|SHAPE_INDEX^|TILE_INDEX^|LAYER_INDEX"
* The seperators are '|' and '^'
* '|' means: seperator between columns
* '^' means: seperator between real column name and displayed column name
* if the displayed column name is empty then the column is not been
shown (in the example ar only the columns 'Code' (UNIQUE_KEY) and 'Name'
(NAME) shown -> 'displayed name' (real column name)
*/
Secondly the RESULTFIELDSMETADATA attribute allows you to specify a
metadata to look for in the mapfile. The default metadata name is
RESULT_FIELDS_LIMITED. In the map file it will look something like:
"RESULT_FIELDS_LIMITED" "NAME ADDRESS TOWN"
Note: The RESULTFIELDSMETADATA query widget attribute is in Chameleon
cvs only.
The priority in the way to limit the displayed attributes is like this:
RESULTFIELDSMETADATA
HEADER
ALL
Norm
More information about the Chameleon
mailing list