2013/5/10 Gery . <gameji...@hotmail.com> > > Hi Raffaele, > > I think the WMS request is always sent. One idea could be that you add > some if/else inside the current if loop or elseif to prevent sending the > request, something like: >
the request being made is not really a problem BTW but that conditional statement doesn't work here, event.feature.length is equal to 0 but nothing is being showed, chrome console shows that everything works on wms request, ie the response is correctly sent to the browser. the problem is that event.features.length is always 0 code: var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'wmsserver', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { var l = event.features.length; alert(event.features.length+"-"+l) if( event.features.length > 0 ) { map.addPopup(new OpenLayers.Popup.FramedCloud( "sostegno", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } } });
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users