[Chameleon] INDEX info
LITTLE Nelson
nelson.little at tenix.com
Wed Aug 15 02:54:18 EDT 2007
I am also working in this area and having experimented with the HEADER
property of the map file the explanation given below is a little
confusing to say the least:
"* 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)"
What this should say is that all columns defined in the HEADER section
will be displayed, however only columns with a 'display column name'
will be displayed with such a name. Hence in the example mentioned below
only UNIQUE_KEY and NAME will be displayed with the names 'Code' and
'Name' respectively, all other columns will have their 'real column
names' displayed.
Cheers,
Nelson
-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Normand
Savard
Sent: Wednesday, 15 August 2007 6:02 AM
To: Ilham Adi Afdillah
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] INDEX info
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^|SHA
PE_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
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
Disclaimer :
The contents of this e-mail including any attachments are intended only
for the person or entity to which this e-mail is addressed. If you are not,
or believe you may not be, the intended recipient, please advise the sender
immediately by return e-mail, delete this e-mail and destroy any copies.
Tenix does not warrant nor guarantee that this email communication is free
from errors, virus, interception or interference.
More information about the Chameleon
mailing list