<div>Hi !</div>
<div> </div>
<div>I dont think that it is the problem, because WMSGetFeatureInfo is generating the "correct" url (I think)...</div>
<div> </div>
<div>Anyway I tested querying only 1 single layer and got the same result...<br><br>Dammit :(</div>
<div> </div>
<div>Thanks anyway</div>
<div> </div>
<div>Stella</div>
<div> </div>
<div class="gmail_quote">On Wed, Jan 27, 2010 at 12:24 PM, Eichner, Andreas - SID-NLKM <span dir="ltr"><<a href="mailto:Andreas.Eichner@sid.sachsen.de">Andreas.Eichner@sid.sachsen.de</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br>Hi Stella,<br><br>according to <a href="http://dev.openlayers.org/docs/files/OpenLayers/Control/WMSGetFeatureInfo-js.html" target="_blank">http://dev.openlayers.org/docs/files/OpenLayers/Control/WMSGetFeatureInfo-js.html</a> the WMSGetFeatureInfo control's constructor takes an array of OpenLayers.Layer.WMS objects. But you give it the list you used to draw as one layer. So you should create two OpenLayers.Layer.WMS objects, one for layer "Test1" and one for "Test2" and then give the control an array of them.<br>
So if I'm correct it should look something like that:<br><br>var _test1 = new OpenLayers.Layer.WMS(<br> "MyLayer 1",<br> _mapfilex,<br> {<br> layers: [ 'Test1'],<br>
<div class="im"> format: "image/png",<br> transparent: "true"<br> },<br> {<br> isBaseLayer: false,<br> buffer: 0,<br>
visibility: true<br> }<br> );<br></div>var _test2 = new OpenLayers.Layer.WMS(<br> "MyLayer 2",<br> _mapfilex,<br> {<br>
layers: [ 'Test2'],<br>
<div class="im"> format: "image/png",<br> transparent: "true"<br> },<br> {<br> isBaseLayer: false,<br> buffer: 0,<br>
visibility: true<br> }<br> );<br></div>
<div class="im">var infoCtl = new OpenLayers.Control.WMSGetFeatureInfo({<br></div> layers: Array(_test1, _test2),<br>
<div class="im"> title: 'Click on the map to get information on layers',<br> queryVisible: true,<br> infoFormat: 'text/html'<br> });<br>
infoCtl.events.register("getfeatureinfo",map,showInfo);<br><br>function showInfo(evt) {<br> alert(evt.text);<br>}<br><br></div>Also I don't know how MapServer handles queries to two or more layers if at least one of them declares header or footer - it might happen that a layer without a header is processed before one with. And from what you got back I suggest that MapServer processes each layer if it was queried alone and therefore outputs the HTTP "Content-type" header after processing the first layer.<br>
<br><br>Mit freundlichen Grüßen,<br><font color="#888888"><br>Andreas Eichner<br></font>
<div>
<div></div>
<div class="h5">_______________________________________________<br>mapserver-users mailing list<br><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br>