Guys, debuging WMSGetFeatureInfo.js, the  layers[i].params.STYLES is empty (&quot;&quot;) ...<br>Is that the error cause? How to define that STYLES property?<br><br>So, just for testing purpose, I commented the follow line:<br>
 //styles: styleNames,<br><br>Than I got I Mssql2008 error :<br><br>msMSSQL2008LayerGetShape(): Query error. Error executing MSSQL2008 SQL statement: SELECT convert(varchar(max), oid),convert(varchar(max), name),the_geom.STAsBinary(),convert(varchar(20), oid) from viwargentina WHERE the_geom.STIntersects(Geometry::STGeomFromText(&amp;#39;POLYGON((-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471,-56.0839061594084 -12.4474347926471))&amp;#39;,0)) = 1 <br>
-[Microsoft][ODBC SQL Server Driver][SQL Server]<br><br>System.FormatException: 24305: <b>The Polygon input is not valid because the ring does not have enough distinct points. Each ring of a polygon must contain at least three distinct points.</b><br>
<br>Help me please<br><br>Stella<br><br><div class="gmail_quote">2010/1/20 stela anders <span dir="ltr">&lt;<a href="mailto:stelaanders@gmail.com">stelaanders@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Steve...<br><br>I done everthing you suggest me...<br>But got the same error ...<br><br>I also took of Uruguay layer... And use only Argentina layer...<br><br>Do you have any other idea? :(<br><br>Thanks so much<br>
<br>
Stella<br><br><div class="gmail_quote"><div class="im">2010/1/19  <span dir="ltr">&lt;<a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank">Steve.Toutant@inspq.qc.ca</a>&gt;</span><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<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 &#39;../template/query.html&#39;</font>
<br>
<br><font size="3">just add &quot;[oid]&quot; in your query.html for now.</font>
</p><p><font size="3">In OL</font>
</p><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"><div class="im"><div> var _wmsControl = new OpenLayers.Control.WMSGetFeatureInfo({
<br>
                   //url
: _mapfilex,               
<br>
                   
title: &#39;Click on the map to get information on layers&#39;, <br>
                   
queryVisible: true, <br></div></div>
                   
infoFormat: &#39;text/html&#39; ,</font>
<br><font size="3">        layers:    
    [YOURLAYERNAME of new OpenLayers.Layer.WMS.....]<br>
               
});</font>
</p><p><font size="3">give it a try...</font>
</p><p>
<br>
<br>
<br>
</p><table width="100%">
<tbody><tr valign="top">
<td width="40%"><div class="im"><div><font face="sans-serif" size="1"><b>stela anders &lt;<a href="mailto:stelaanders@gmail.com" target="_blank">stelaanders@gmail.com</a>&gt;</b>
</font>
</div></div><p><font face="sans-serif" size="1">19/01/2010 02:16 PM</font>
</p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">A</font></div>
</td><td><div class="im"></div><td><div><font face="sans-serif" size="1"><a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank">Steve.Toutant@inspq.qc.ca</a></font>
</div></td></td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td><font face="sans-serif" size="1">openlayers user list &lt;<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a>&gt;,
<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Objet</font></div>
</td><td><font face="sans-serif" size="1">Re: RE [OpenLayers-Users] WMSGetFeatureInfo
error (Style (undefined)         not defined
on layer) ...</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table><div><div></div><div class="h5"><div><div></div><div>
<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>
            &quot;wms_title&quot;   
&quot;Argentina&quot;   ##required       
    <br>
            &quot;wms_feature_info_mime_type&quot;
&quot;text/html&quot; <br>
        END<br>
        GROUP &quot;Test&quot;<br>
        TYPE POLYGON<br>
        STATUS ON<br>
        INCLUDE &quot;Connection.map&quot; 
##MSSQL2008        <br>
        DATA &quot;the_geom from viwargentina
USING UNIQUE oid USING SRID=0&quot;<br>
        PROJECTION<br>
            &quot;+init=epsg:4326&quot;<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(&quot;Country&quot;,<br>
               
_mapfile, {<br>
                   
layers: [&#39;Argentina&#39;, &#39;Uruguay&#39;],<br>
                   
format: &quot;image/png&quot;,<br>
                   
transparent: &quot;true&quot;<br>
               
}, {<br>
                   
isBaseLayer: true,<br>
                   
buffer: 0,<br>
                   
visibility: true<br>
               
}),<br>
<br>
Event to register control:<br>
_wmsControl.events.register(&quot;getfeatureinfo&quot;,map,showInfo); <br>
<br>
Thanks<br>
<br>
</font>
<br><font size="3">2010/1/19 &lt;</font><a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank"><font color="blue" size="3"><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size="3">&gt;</font>
<br><font face="sans-serif" size="2"><br>
Wich mapServer version?</font><font size="3"> </font><font face="sans-serif" size="2"><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 face="sans-serif" size="2"><br>
Do you register an event for this control, please provide all the code
related to this control.</font><font size="3"> </font><font face="sans-serif" size="2"><br>
steve</font><font size="3"> </font>
<p><font size="3"><br>
<br>
</font>
</p><p>
</p><table width="100%">
<tbody><tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>stela anders &lt;</b></font><a href="mailto:stelaanders@gmail.com" target="_blank"><font color="blue" face="sans-serif" size="1"><b><u>stelaanders@gmail.com</u></b></font></a><font face="sans-serif" size="1"><b>&gt;@</b></font><a href="http://openlayers.org/" target="_blank"><font color="blue" face="sans-serif" size="1"><b><u>openlayers.org</u></b></font></a><font face="sans-serif" size="1">
<br>
Envoyé par : </font><a href="mailto:users-bounces@openlayers.org" target="_blank"><font color="blue" face="sans-serif" size="1"><u>users-bounces@openlayers.org</u></font></a><font size="3">
</font>
<p><font face="sans-serif" size="1">19/01/2010 01:36 PM</font><font size="3">
</font>
</p></td><td width="59%">
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="5%">
<div align="right"><font face="sans-serif" size="1">A</font></div>
</td><td width="94%"><font face="sans-serif" size="1">openlayers user list &lt;</font><a href="mailto:users@openlayers.org" target="_blank"><font color="blue" face="sans-serif" size="1"><u>users@openlayers.org</u></font></a><font face="sans-serif" size="1">&gt;</font><font size="3">
</font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Objet</font></div>
</td><td><font face="sans-serif" size="1">[OpenLayers-Users] WMSGetFeatureInfo
error (Style (undefined) not        defined on layer)
...</font></td></tr></tbody></table>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="50%">
</td><td width="50%"></td></tr></tbody></table>
<br></td></tr></tbody></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>
&lt;?xml version=&#39;1.0&#39; encoding=&quot;ISO-8859-1&quot; standalone=&quot;no&quot;
?&gt;<br>
&lt;!DOCTYPE ServiceExceptionReport SYSTEM &quot;</font><a href="http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd" target="_blank"><font color="blue" size="3"><u>http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd</u></font></a><font size="3">&quot;&gt;<br>


&lt;ServiceExceptionReport version=&quot;1.1.0&quot;&gt;<br>
&lt;ServiceException code=&quot;StyleNotDefined&quot;&gt;<br>
msWMSLoadGetMapParams(): WMS server error. Style (undefined) not defined
on layer.<br>
&lt;/ServiceException&gt;<br>
&lt;/ServiceExceptionReport&gt;<br>
<br>
<br>
My control :<br>
<br>
 var _wmsControl = new OpenLayers.Control.WMSGetFeatureInfo({ <br>
                   
url : _mapfilex,               
<br>
                   
title: &#39;Click on the map to get information on layers&#39;, <br>
                   
queryVisible: true, <br>
                   
infoFormat: &#39;application/vnd.ogc.wms_xml&#39; <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 color="blue" size="2"><u><br>
</u></font></tt><a href="mailto:Users@openlayers.org" target="_blank"><tt><font color="blue" size="2"><u>Users@openlayers.org</u></font></tt></a><tt><font color="blue" size="2"><u><br>
</u></font></tt><a href="http://openlayers.org/mailman/listinfo/users" target="_blank"><tt><font color="blue" size="2"><u>http://openlayers.org/mailman/listinfo/users</u></font></tt></a><font size="3"><br>
<br>
<br>
</font>
<br>
<br>
<br>
<br></div></div></div></div></blockquote></div><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>