[Chameleon] INDEX info
Normand Savard
nsavard at mapgears.com
Tue Aug 14 16:31:32 EDT 2007
Ilham Adi Afdillah wrote:
>Hi list,
>
>I have some question, sorry if this problem have posted in this forum:
>1. How to remove "SHAPE_INDEX", "TILE_INDEX", "LAYER_INDEX", that shown
>with Identify tool (Query widget) and LocateByAttribte widget?.
>
>
Correct me if I'm wrong you want to display less attributes in the
result page. Is that it? For the Query widget I already answered it in
a previous post. I simply pasted my previous answer here.
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
>2. Can we print the Detail Information page that generate/shown by
>LocateByAttribute widget, I have try to add javascript print function
>without success?.
>3. How to use OWTChart widget in the new chameleon beta release base on
>PostgreeSQL databases?
>
>
>
For this widget I didn't know much but only that the widget definition
is like the following:
<cwc2 type="ChartLayer" styleresource="TextButtons"
popupstyleresource="TextButtons" PopupWidth="300" PopupHeight="450"
Toolbar="false" Status="false" Menubar="false" Visible="true"
Scrollbars="true" Image="icons/icon_chart.png" Label="Add Charts"
ImageTip="Add charts to layers">
<Join JoinType="PGSQL" Layer="ROI" LayerID="id_act"
JoinId="id_act" PGConnection="host=localhost port=yourport
dbname=postgis user=username" PGTable="pol_test1"/>
<Join JoinType="PGSQL" Layer="ROI" LayerID="id_act"
JoinId="id_act" PGConnection="host=localhost port=yourport
dbname=postgis user=username" PGTable="pol_test2"/>
<image state="normal"/>
<image state="selected"/>
<image state="hover"/>
</cwc2>
Your Postgis layer has to look somethink like this:
LAYER
CONNECTION "host=localhost port=yourport dbname=yourdbname
user=username"
CONNECTIONTYPE POSTGIS
DATA "the_geom from (SELECT gid,id_act,nombre ) as foo using unique gid"
NAME "Test"
TEMPLATE 'template.html'
STATUS ON
TOLERANCE 0
TOLERANCEUNITS PIXELS
TYPE POLYGON
UNITS METERS
TRANSPARENCY 50
CLASS
COLOR 0 255 0
END # Class
END # Layer
Norm
More information about the Chameleon
mailing list