[mapserver-users] WMSGetFeatureInfo problem (No results, using OL)
stela anders
stelaanders at gmail.com
Mon Jan 25 10:50:13 PST 2010
Hello guys...
My mapfile:
...
PROJECTION
"+init=epsg:4326"
END
WEB
IMAGEPATH 'C:\temp\'
IMAGEURL '/tmp/'
QUERYFORMAT text/html
METADATA
"wms_title" "WMS Server"
"wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?"
"wms_srs" "EPSG:4326 EPSG:42304 EPSG:42101 EPSG:4269"
'wms_feature_info_mime_type' "text/html"
END
END
QUERYMAP
COLOR 255 0 0
SIZE -1 -1
STATUS OFF
STYLE hilite
END
...
LAYER
...
METADATA
"wms_title" "Test" ##required
"wms_include_items" "all"
"wms_feature_info_mime_type" "text/html"
END
TYPE POINT
STATUS ON
INCLUDE "Connection.map"
DATA "the_geom from viwtest USING UNIQUE oid USING SRID=0"
PROJECTION
"+init=epsg:4326"
END
TOLERANCE 5
HEADER "header.html"
TEMPLATE "template.html"
FOOTER "footer.html"
...
Templates:
Header.html
<!-- MapServer Template -->
<html>
<head>
<title>MapServer Template Sample</title>
</head>
Template.html
<!-- MapServer Template -->
<body>
<b>OID:</b> [oid]
</body>
Footer.html
</html>
WMSGetFeatureInfo Javascript (OpenLayer)
var infoCtl = new OpenLayers.Control.WMSGetFeatureInfo({
layers: [_test],
title: 'Click on the map to get information on layers',
queryVisible: true,
infoFormat: 'text/html'
});
infoCtl.events.register("getfeatureinfo",map,showInfo);
function showInfo(evt) {
alert(evt.text);
}
I´m getting that :
<html>
<head>
<title>MapServer Template Sample</title>
</head> Content-type: application/vnd.ogc.se_xml
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "
http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException>
</ServiceException>
</ServiceExceptionReport>
Any idea whats happening?
Stella
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100125/cd0eea99/attachment.htm>
More information about the MapServer-users
mailing list