Someone else had almost the same question recently. Check out this thread: http://lists.umn.edu/cgi-bin/wa?A2=ind0801&L=mapserver-users&T=0&F=&S=&P=12017
You have likely put the image tag in your main query template, if you move it to the header template or the footer template, it will only be displayed once for each query. If you are not seeing data values returned in your query, you may not have placed the column names in your query template, or they may not be specified properly. The column names may be case sensitive. David. -----Original Message----- From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of Paul Alarcon Sent: Monday, January 21, 2008 10:46 AM To: [email protected] Subject: [UMN_MAPSERVER-USERS] featureitemquery help Hello I am new here and i am having some problems with this kind of query , when, I`m using html for the page and postgis to create the layers but when i made the query a lot of map display each time and dont show me the information please could you help me, Here is the html and the map files HTML <html> <head> <title>Busqueda por CANTON</title> <body> <form name="consulta" method=GET action="/cgi-bin/mapserv"> <input name="program" value="/cgi-bin/mapserv" type="hidden"> <input name="map" value="/home/test/testexpression.map" type="hidden"> <!-- parametros pasados en hidden --> <input name="mode" value="itemfeaturequery" type="hidden"> <input name="slayer" value="cantones" type="hidden"> <input name="qitem" value="non_canton" type="hidden"> <input type="hidden" name="mapshape" value=""> <input type="hidden" name="imgshape" value=""> <input type="hidden" name="imgbox" value=""> <input type="hidden" name="shapeindex" value=""> <!-- parametros de busqueda --> Seleccione un Cantón: <br> <select name="qstring" > <option value="non_canton like 'LAGO AGRIO'">LAGO AGRIO</option> <option value="non_canton like 'SUCUMBIOS'">SUCUMBIOS</option> <option value="non_canton like 'GONZALO PIZARRO'">GONZALO PIZARRO</option> <option value="non_canton like 'CASCALES'">CASCALES</option> <option value="non_canton like 'SHUSHUFINDI'">SHUSHUFINDI</option> <option value="non_canton like 'CUYABENO'">CUYABENO</option> <option value="non_canton like 'PUTUMAYO'">PUTUMAYO</option></select> <p> <input value="BUSCAR" type="submit"> </form> </body> </html> MAP FILE MAP NAME test #MapFile testing possible bug on itemquery STATUS ON SIZE 800 600 EXTENT 836705.704288 9999113.003817 1143436.012879 10051849.051893 STATUS ON #SHAPEPATH "/home/mapdata/Pichincha/pruebas/POLITICO 2002/" IMAGECOLOR 255 255 255 IMAGETYPE PNG FONTSET "/srv/www/htdocs/ka-map/fontset.txt" ################################################# WEB IMAGEPATH "/srv/www/htdocs/temp/" IMAGEURL "/temp/" TEMPLATE "querytemplate.html" END # End of Web Interface ################################################# # Symbol para lineas gruesas SYMBOL NAME "BigLine" TYPE ELLIPSE POINTS 1 1 END END ##################################### # Symbol para puntos # SYMBOL NAME "Circle" FILLED true TYPE ellipse POINTS 1 1 END END ##################################### #Symbol cuadrado base SYMBOL NAME "Cuadro" TYPE VECTOR POINTS 0 0 0 1 1 1 1 0 0 0 END FILLED TRUE END ######################################## #SYMBOL circulo SYMBOL NAME "punkt" TYPE ELLIPSE POINTS 1 1 END FILLED TRUE END ########################################### querymap status ON SIZE 400 300 style SELECTED END ############################################# LAYER NAME cantones STATUS DEFAULT TYPE POLYGON CONNECTIONTYPE postgis CONNECTION "host=localhost port=5432 dbname=demo_postgis user=postgres password=" DATA "the_geom from cantones" LABELCACHE on TOLERANCE 0 METADATA qstring_validation_pattern '.' END LABELITEM "non_canton" TEMPLATE "querytemplate.html" CLASS NAME "None" OUTLINECOLOR 0 0 0 COLOR 187 212 201 END END #end layer ############################################################3 LAYER NAME parroquias STATUS DEFAULT TYPE line CONNECTIONTYPE postgis CONNECTION "host=localhost port=5432 dbname=demo_postgis user=postgres password=" DATA "the_geom from parroquias" STATUS default #METADATA # qstring_validation_pattern '.' #END LABELITEM "parroquia" #DATA 'parroquial' CLASS NAME "None" #OUTLINECOLOR 100 0 0 COLOR 0 5 5 END END #end layer ################# LAYER NAME PROVINCIAS STATUS DEFAULT TYPE line #METADATA # qstring_validation_pattern '.' #END #LABELITEM "PARROQUIA" #DATA 'provincial' CONNECTIONTYPE postgis CONNECTION "host=localhost port=5432 dbname=demo_postgis user=postgres password=" DATA "the_geom from provincial" CLASS NAME "None" #OUTLINECOLOR 100 0 0 COLOR 0 0 5 STYLE SYMBOL "BigLine" SIZE 4 #COLOR 50 212 51 OUTLINECOLOR 12 0 0 END END END #end layer ##################################### LAYER NAME "Escuelas" CONNECTIONTYPE postgis CONNECTION "host=localhost port=5432 dbname=demo_postgis user=postgres password=" DATA "the_geom from sucumbios" STATUS default TYPE point LABELITEM "plantel" LABELCACHE on HEADER "/srv/www/htdocs/head_plan.html" FOOTER "/srv/www/htdocs/foot_plan.html" CLASSITEM "nivel" METADATA qstring_validation_pattern '.' "queryable" "true" "searchfield" "canton" # "fields" "canton:CANTON,parroqui_1:PARROQUIA,nombre_esc:NOMBRE" END GROUP "PLANTELES" CLASS NAME "PREPRIMARIO" TEMPLATE "querytemplate.html" EXPRESSION "Preprimario" STYLE SYMBOL "cuadro" SIZE 10 COLOR 255 0 0 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "punkt" SIZE 8 COLOR 204 204 255 OUTLINECOLOR 0 0 0 END LABEL TYPE truetype FONT "DejaVuSerif" SIZE 8 COLOR 0 0 0 #OUTLINECOLOR 0 0 0 #BACKGROUNDCOLOR 255 255 255 MINDISTANCE 20 POSITION uc ANGLE 0.00 ANTIALIAS false BUFFER 20 END #label END #clase CLASS NAME "PRIMARIO" TEMPLATE "querytemplate.html" EXPRESSION "Primario" STYLE SYMBOL "cuadro" SIZE 10 COLOR 0 255 0 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "punkt" SIZE 8 COLOR 204 204 255 OUTLINECOLOR 0 0 0 END LABEL TYPE truetype FONT "DejaVuSerif" SIZE 8 COLOR 0 0 0 #OUTLINECOLOR 0 0 0 #BACKGROUNDCOLOR 255 255 255 MINDISTANCE 20 POSITION uc ANGLE 0.00 ANTIALIAS false BUFFER 20 END #label END # Clase CLASS NAME "MEDIO" TEMPLATE "querytemplate.html" EXPRESSION /^Medio/ STYLE SYMBOL "cuadro" SIZE 10 COLOR 0 0 255 OUTLINECOLOR 0 0 0 END STYLE SYMBOL "punkt" SIZE 8 COLOR 204 204 255 OUTLINECOLOR 0 0 0 END LABEL TYPE truetype FONT "DejaVuSerif" SIZE 8 COLOR 0 0 0 #OUTLINECOLOR 0 0 0 #BACKGROUNDCOLOR 255 255 255 MINDISTANCE 20 POSITION uc ANGLE 0.00 ANTIALIAS false BUFFER 20 END END CLASS NAME "S/Dato" TEMPLATE "querytemplate.html" EXPRESSION " " STYLE SYMBOL "Circle" SIZE 10 COLOR 255 0 0 OUTLINECOLOR 0 0 0 END LABEL TYPE truetype FONT "DejaVuSerif" SIZE 8 COLOR 0 0 0 #OUTLINECOLOR 0 0 0 #BACKGROUNDCOLOR 255 255 255 MINDISTANCE 50 POSITION uc ANGLE 0.00 ANTIALIAS false BUFFER 20 END END END #LAYER ########################################################################### END #end mapfile _________________________________________________________________ MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/
