<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<pre>Hi all,<br><br> <br><br>I have a problem.<br><br>I need an expression to limit queries only to the layers that are visible at that time on the map.<br>Queries are displayed via a popup.<br>The code where queries are made and displayed in the popup is as follows:<br><br>var showInfo = function(event) {<br>                                <br> var pixel = event.xy;<br> var lonlat = this.getLonLatFromPixel(pixel);<br> var message = null;<br> var params = {}; <br> params['service'] = 'wms'; <br> params['request'] = 'GetFeatureInfo'; <br> params['version'] = '1.1.1'; <br> params['info_format'] = 'text/plain';<br> params['srs'] = this.getProjection();<br> params['bbox'] = this.getExtent().toBBOX(6);<br> params['width'] = this.getSize().w; <br> params['height'] = this.getSize().h;<br> params['feature_count'] = 1; <br> params['x'] = pixel.x; .<br> params['y'] = pixel.y; <br> params['layers'] = 'camino'; <br> params['query_layers'] = 'camino';<br>                <br>                new OpenLayers.Request.GET({<br>                        url: server,<br>                        async: false,<br>                        params: params,<br>                        success: function(data) {<br>                                message = data.responseText;<br>                        }<br>                });<br>                <br>                <br>                <br>                message = getHTML(message);<br>                <br>                <br>                var popup = new OpenLayers.Popup.FramedCloud('popup', lonlat, null, message, null, true, null);<br>                <br>                this.addPopup(popup);<br><br>};//End of function showInfo()<br><br>        map.events.register('click', map, showInfo);<br></pre><br /><hr />¿Eres del Madrid, del Barça, del Atleti...? Apoya a tu equipo en la <a href='http://opiniones.msn.es/default.aspx/Futbol/Atletico-de-Madrid ' target='_new'>Zona Fan de MSN Deportes</a></body>
</html>