Hi all,

 

I have a problem.

I need an expression to limit queries only to the layers that are visible at 
that time on the map.
Queries are displayed via a popup.
The code where queries are made and displayed in the popup is as follows:

var showInfo = function(event) {
                                
                var pixel = event.xy;
                var lonlat = this.getLonLatFromPixel(pixel);
                var message = null;
                var params = {}; 
                params['service'] = 'wms'; 
                params['request'] = 'GetFeatureInfo'; 
                params['version'] = '1.1.1'; 
                params['info_format'] = 'text/plain';
                params['srs'] = this.getProjection();
                params['bbox'] = this.getExtent().toBBOX(6);
                params['width'] = this.getSize().w; 
                params['height'] = this.getSize().h;
                params['feature_count'] = 1; 
                params['x'] = pixel.x; .
                params['y'] = pixel.y; 
                params['layers'] = 'camino'; 
                params['query_layers'] = 'camino';
                
                new OpenLayers.Request.GET({
                        url: server,
                        async: false,
                        params: params,
                        success: function(data) {
                                message = data.responseText;
                        }
                });
                
                
                
                message = getHTML(message);
                
                
                var popup = new OpenLayers.Popup.FramedCloud('popup', lonlat, 
null, message, null, true, null);
                
                this.addPopup(popup);

};//End of function showInfo()

        map.events.register('click', map, showInfo);

_________________________________________________________________
Comparte, crea, disfruta… Descubre todo, en estos vídeos
http://www.windowslive.es 
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to