Thanks!! now I could change colors!!<br> <br> But now I have another question... I want to use the query tool (i) in ka-map... I want the user can click the map and the system can make a query to my database! I read several docs but I cannot understand how to configure it....<br> <br> my .map file is the following:<br> <br> -------------------------------------------------------------------------------------<br> MAP<br> EXTENT -73.577781 -55.061313 -53.591835 -21.781276<br> SIZE 400 400<br> # IMAGECOLOR 255 22 22<br> UNITS METERS<br> IMAGETYPE PNG<br> # TRANSPARENT ON<br> <br> <br> SYMBOLSET ../etc/symbols.sym<br> UNITS METERS<br> IMAGECOLOR 255 255 255<br> FONTSET ../etc/fonts.txt<br> <br> <br> <br> <br> <br> LEGEND<br> TRANSPARENT TRUE<br> END<br> <br> SCALEBAR<br>
TRANSPARENT TRUE<br> END<br> <br> WEB<br> <br> METADATA<br> max_extents "-73.577781 -55.061313 -53.591835 -21.781276"<br> END<br> # MINSCALE 20.00000<br> # MAXSCALE 500.00000<br> IMAGEPATH "/usr/local/apache2/htdocs/tmp"<br> IMAGEURL "/tmp/"<br> END<br> <br> <br> #<br> # Start of reference map<br> #<br> REFERENCE<br> IMAGE ../images/keymap.png<br> EXTENT -73.577781 -55.061313 -53.591835 -21.781276<br> STATUS ON<br> COLOR -1 -1 -1<br> OUTLINECOLOR 95 158 160<br> SIZE 120 90 <br> END<br> <br> #<br> # Start of legend<br> #<br> LEGEND<br> KEYSIZE 18 12<br> LABEL<br> TYPE BITMAP<br> SIZE MEDIUM<br> COLOR 0 0 89<br> END<br> STATUS ON<br> END<br> <br> #<br> # Start of scalebar<br> #<br>
SCALEBAR<br> IMAGECOLOR 255 255 255<br> LABEL<br> COLOR 0 0 0 <br> SIZE SMALL<br> END<br> SIZE 150 5<br> COLOR 255 255 255<br> BACKGROUNDCOLOR 0 0 0<br> OUTLINECOLOR 0 0 0<br> UNITS kilometers<br> INTERVALS 5<br> STATUS ON<br> END<br> <br> <br> QUERYMAP<br> STYLE HILITE<br> COLOR 255 0 0<br> END<br> <br> <br> #<br> # Start of layer definitions<br> #<br> <br> LAYER<br> NAME "contorno"<br> GROUP "CONTORNO"<br> CONNECTIONTYPE postgis<br> CONNECTION "host=10.0.3.218 port=5432 dbname=argentina password=*** user=****"<br> DATA "the_geom FROM argentina1"<br> TYPE POLYGON<br> STATUS ON<br> # DEBUG ON<br> METADATA<br> "DESCRIPTION" "Contorno"<br> END<br> <br> METADATA<br> #this must be enabled to use ka-Map! query - map_query.php<br>
"queryable" "true"<br> END<br> TOLERANCE 3<br> <br> CLASS<br> NAME "Contorno"<br> TEMPLATE "query/contorno_template.html"<br> STYLE<br> COLOR 205 92 92<br> OUTLINECOLOR 64 224 208<br> SYMBOL 0<br> END<br> END<br> END<br> <br> LAYER<br> NAME "limites provincia"<br> GROUP "PROVINCIAS"<br> CONNECTIONTYPE postgis<br> CONNECTION "host=10.0.3.218 port=5432 dbname=argentina password=**** user=****"<br> DATA "the_geom FROM argentina2"<br> TYPE POLYGON<br> STATUS ON<br> # DEBUG ON<br> METADATA<br> "DESCRIPTION" "Provincias"<br> END<br> CLASS<br> NAME "Provincias"<br> STYLE<br> COLOR 184 134 11<br>
OUTLINECOLOR 120 120 120<br> SYMBOL 0<br> END<br> END<br> END<br> <br> LAYER<br> NAME "limites ciudad"<br> GROUP "DISTRITOS"<br> CONNECTIONTYPE postgis<br> CONNECTION "host=10.0.3.218 port=5432 dbname=argentina password=**** user=****"<br> DATA "the_geom FROM argentina3"<br> TYPE POLYGON<br> STATUS ON<br> # DEBUG ON<br> CLASS<br> NAME "Ciudades"<br> STYLE<br> COLOR 147 112 219<br> OUTLINECOLOR 199 199 199<br> SYMBOL 0<br> END<br> END<br> END<br> END <br> --------------------------------------------------------------------------<br> <br> I added to the first layer (contorno) the "queryable true" sentence and the template in which I have the column I want to query... (in the table "argentina1")... here is my contorno_template.html file<br> <br>
---------------------------------------------------------------------------------<br> <html> <br> <head> <br> <title>MapServer Probando query</title> <br> </head><br> <body><br> <tr><br> <td>[lrn]</td><br> <td>[adm0]</td><br> </tr><br> </body><br> </html><br> -----------------------------------------------------------------------------------<br> <br> adm0 contains the information of the area clicked... (it is a colum in the argentina0 table)<br> but now when I click in the map, only the information in the .map file is returned, in this case, the name of the layer (contorno).... may be I have to do more changes....<br> <br> Thanks!!<br> Agustina<br> <br> <p> 
                <hr size=1>
<b>Preguntá. Respondé. Descubrí.</b><br>
Todo lo que querías saber, y lo que ni imaginabas,<br>
está en <b>Yahoo! Respuestas</b> (Beta).<br>
<b><a href="http://ar.answers.yahoo.com">Probalo ya!</a></b>