[mapserver-users] WMS getfeatureinfo
Manuel Mancipe
manuel.mancipe at gmail.com
Sat Jul 9 10:18:31 PDT 2011
Thank you
Please, get this error:
msWMSFeatureInfo(): WMS server error. Unsupported INFO_FORMAT value
(text/html).
the capabilities of the service is:
http://wwww.uptc.edu.co/cgi-bin2/mapserv?map=/mnt/datos2_9teras/DatosUsuariosUPTC-UniValle/ms4w/apps/100/gismap/co.map&service=WMS&version=1.3.0&request=GetCapabilities
and the request is:
http://10.0.32.22:8080/cgi-bin2/mapserv?map=/mnt/datos2_9teras/DatosUsuariosUPTC-UniValle/ms4w/apps/100/gismap/co.map&service=WMS&version=1.1.0&request=GetFeatureInfo&layers=public.col&WIDTH=5&HEIGHT=5&SRS=EPSG:3116&BBOX=164948,22962,1806820,1985180&QUERY_LAYERS=public.col&INFO_FORMAT=text/html&I=1&J=1
changing:
INFO_FORMAT=text/plain, works
and my layer is
LAYER
NAME "public.col"
STATUS OFF
TYPE POLYGON
DATA "the_geom from public.colombia_limites_departamentales using unique gid
using srid=3116"
CONNECTIONTYPE POSTGIS
CONNECTION "user=postgres password=#### host=######## port=#######
dbname=######"
DUMP TRUE #MFMH
MAXSCALE -1.0
MINSCALE -1.0
TRANSPARENCY 50
SIZEUNITS pixels
LABELITEM "nombre_dpt"
HEADER "getfeatureinfo_header.html" # header html template
TEMPLATE "getfeatureinfo_content2.html" # content html template
FOOTER "getfeatureinfo_footer.html" # footer html template
PROJECTION
"init=epsg:3116"
END
CLASS
STYLE
COLOR 211 241 99
OUTLINECOLOR 0 0 102
WIDTH 1
END
TEMPLATE "getfeatureinfo_content2.html"
NAME "default"
LABEL
FONT "vera"
ANGLE FOLLOW
COLOR 0 0 0
TYPE truetype
SIZE 5.599999904632568
END
END
METADATA
"wms_title" "public.col"
"wms_abstract" "generated by gvSIG"
"wms_extent" "164948.448508268 22962.0012082234 1806815.88683738
1985175.02869968"
"gml_include_items" "all"#MFMH
"wms_feature_info_mime_type" "text/html; driver=imagemap"#MFMH
"gml_include_items" "all"#MFMH
"wms_include_items" "all"#MFMH
"ows_feature_info_mime_type" "text/html; driver=imagemap"
# "wms_include_items" "text/html"
END
END
this is my table:
CREATE TABLE colombia_limites_departamentales
(
gid serial NOT NULL,
objectid integer,
id_espacia text,
area_ofici double precision,
nombre_dpt text,
shape_area double precision,
shape_len double precision,
the_geom geometry,
..........)
the file getfeatureinfo_header.html is:
1: <!-- MapServer Template -->
2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/transitional.dtd">
3: <html>
4: <head>
5: <!-- enforce the client to display result html as UTF-8 encoding -->
6: <meta http-equiv="content-type" content="text/html;
charset=UTF-8"></meta>
7: <style type="text/css">
8: table, th, td {
9: border:1px solid #e5e5e5;
10: border-collapse:collapse;
11: font-family: arial;
12: font-size: 80%;
13: color: #333333
14: }
15: th, td {
16: valign: top;
17: text-align: center;
18: }
19: th {
20: background-color: #aed7ff
21: }
22: caption {
23: border:1px solid #e5e5e5;
24: border-collapse:collapse;
25: font-family: arial;
26: font-weight: bold;
27: font-size: 80%;
28: text-align: left;
29: color: #333333;
30: }
31: </style>
32: <title>GetFeatureInfo Response</title>
33:
34: </head>
35: <body>
36: <table>
37: <caption>layer names: COLOMBIA</caption>
38: <tbody>
39: <th>Layer Name</th>
40: <th>NAME</th>
41: <th>ID</th>
42: <th>AREA</th>
the file getfeatureinfo_footer.html is:
1: <!-- MapServer Template -->
2: </tbody>
3: </table>
4: <br/>
5: </body>
6: </html>
and my file getfeatureinfo_content2.html is:
1: <!-- MapServer Template -->
2: <tr>
3: <td>Colombia</td>
4: <td>[item name=nombre_dpt format=$value escape=none]</td>
5: <td>[item name=id_espacia format=$value escape=none]</td>
6: <td>[item name=shape_area format=$value escape=none]</td>
7: </tr>
please could help me fix the error.
--
Manuel Fernando Mancipe Huérfano
Ingeniería de Sistemas y Computación
Universidad Pedagógica y Tecnológica de Colombia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110709/1e139b58/attachment.htm>
More information about the MapServer-users
mailing list