<p><font size=3>In the mapfile, you must define a tolerance and a template
for both layer (Argentina and Uruguay)</font>
<br><font size=3>TOLERANCE 0</font>
<br><font size=3>TEMPLATE '../template/query.html'</font>
<br>
<br><font size=3>just add "[oid]" in your query.html for now.</font>
<p><font size=3>In OL</font>
<p><font size=3>You are querying every layer with a template. Keep it simple
and try first with one layer</font>
<br><font size=3> var _wmsControl = new OpenLayers.Control.WMSGetFeatureInfo({
<br>
//url
: _mapfilex,
<br>
title: 'Click on the map to get information on layers', <br>
queryVisible: true, <br>
infoFormat: 'text/html' ,</font>
<br><font size=3> layers:
[YOURLAYERNAME of new OpenLayers.Layer.WMS.....]<br>
});</font>
<p><font size=3>give it a try...</font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>stela anders <stelaanders@gmail.com></b>
</font>
<p><font size=1 face="sans-serif">19/01/2010 02:16 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">Steve.Toutant@inspq.qc.ca</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">openlayers user list <users@openlayers.org>,
users-bounces@openlayers.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: RE [OpenLayers-Users] WMSGetFeatureInfo
error (Style (undefined) not defined
on layer) ...</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=3>Hi Steve...<br>
<br>
Mapserver version:<br>
MapServer version 5.6.0-beta4 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE<br>
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER<br>
SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE<br>
<br>
<br>
One layer definition (Mapfile)<br>
<br>
LAYER<br>
NAME Argentina<br>
METADATA<br>
"wms_title"
"Argentina" ##required
<br>
"wms_feature_info_mime_type"
"text/html" <br>
END<br>
GROUP "Test"<br>
TYPE POLYGON<br>
STATUS ON<br>
INCLUDE "Connection.map"
##MSSQL2008 <br>
DATA "the_geom from viwargentina
USING UNIQUE oid USING SRID=0"<br>
PROJECTION<br>
"+init=epsg:4326"<br>
END<br>
<br>
CLASS<br>
COLOR 255 200
255<br>
STYLE<br>
OUTLINECOLOR 190 190 190<br>
WIDTH 1<br>
END<br>
END<br>
END<br>
<br>
<br>
I´m using GeoExt to be able to use Sublayers, one layer definition :<br>
<br>
new OpenLayers.Layer.WMS("Country",<br>
_mapfile, {<br>
layers: ['Argentina', 'Uruguay'],<br>
format: "image/png",<br>
transparent: "true"<br>
}, {<br>
isBaseLayer: true,<br>
buffer: 0,<br>
visibility: true<br>
}),<br>
<br>
Event to register control:<br>
_wmsControl.events.register("getfeatureinfo",map,showInfo); <br>
<br>
Thanks<br>
<br>
</font>
<br><font size=3>2010/1/19 <</font><a href=mailto:Steve.Toutant@inspq.qc.ca><font size=3 color=blue><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size=3>></font>
<br><font size=2 face="sans-serif"><br>
Wich mapServer version?</font><font size=3> </font><font size=2 face="sans-serif"><br>
Can you send one layer definition of the mapfile and how you create the
Ol layer for this layer?</font><font size=3> </font><font size=2 face="sans-serif"><br>
Do you register an event for this control, please provide all the code
related to this control.</font><font size=3> </font><font size=2 face="sans-serif"><br>
steve</font><font size=3> </font>
<p><font size=3><br>
<br>
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>stela anders <</b></font><a href=mailto:stelaanders@gmail.com target=_blank><font size=1 color=blue face="sans-serif"><b><u>stelaanders@gmail.com</u></b></font></a><font size=1 face="sans-serif"><b>>@</b></font><a href=http://openlayers.org/ target=_blank><font size=1 color=blue face="sans-serif"><b><u>openlayers.org</u></b></font></a><font size=1 face="sans-serif">
<br>
Envoyé par : </font><a href="mailto:users-bounces@openlayers.org" target=_blank><font size=1 color=blue face="sans-serif"><u>users-bounces@openlayers.org</u></font></a><font size=3>
</font>
<p><font size=1 face="sans-serif">19/01/2010 01:36 PM</font><font size=3>
</font>
<td width=59%>
<br>
<table width=100%>
<tr valign=top>
<td width=5%>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td width=94%><font size=1 face="sans-serif">openlayers user list <</font><a href=mailto:users@openlayers.org target=_blank><font size=1 color=blue face="sans-serif"><u>users@openlayers.org</u></font></a><font size=1 face="sans-serif">></font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">[OpenLayers-Users] WMSGetFeatureInfo
error (Style (undefined) not defined on layer)
...</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=50%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
<br>
<br>
<br>
Hiii !!<br>
<br>
I´m using Mapserver WMS + Openlayers...<br>
I created a WMSGetFeatureInfo control, when I try to use I got that error:
<br>
<br>
<?xml version='1.0' encoding="ISO-8859-1" standalone="no"
?><br>
<!DOCTYPE ServiceExceptionReport SYSTEM "</font><a href=http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd target=_blank><font size=3 color=blue><u>http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd</u></font></a><font size=3>"><br>
<ServiceExceptionReport version="1.1.0"><br>
<ServiceException code="StyleNotDefined"><br>
msWMSLoadGetMapParams(): WMS server error. Style (undefined) not defined
on layer.<br>
</ServiceException><br>
</ServiceExceptionReport><br>
<br>
<br>
My control :<br>
<br>
var _wmsControl = new OpenLayers.Control.WMSGetFeatureInfo({ <br>
url : _mapfilex,
<br>
title: 'Click on the map to get information on layers', <br>
queryVisible: true, <br>
infoFormat: 'application/vnd.ogc.wms_xml' <br>
});<br>
<br>
<br>
All layers on my mapfile have Style defined... <br>
<br>
Any idea?<br>
<br>
Thanks<br>
<br>
Stella</font><tt><font size=2>_______________________________________________<br>
Users mailing list</font></tt><tt><font size=2 color=blue><u><br>
</u></font></tt><a href=mailto:Users@openlayers.org target=_blank><tt><font size=2 color=blue><u>Users@openlayers.org</u></font></tt></a><tt><font size=2 color=blue><u><br>
</u></font></tt><a href=http://openlayers.org/mailman/listinfo/users target=_blank><tt><font size=2 color=blue><u>http://openlayers.org/mailman/listinfo/users</u></font></tt></a><font size=3><br>
<br>
<br>
</font>
<br>
<br>
<br>
<br>