[OpenLayers-Users] WFSGetFeatureInfo and OpenLayers.Popup.FramedCloud

Gery . gamejihou at hotmail.com
Fri May 10 06:50:14 PDT 2013


try with something else than 0


__________________________________________________________________________________________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie es NICHT, wenn es NICHT notwendig ist.


Date: Fri, 10 May 2013 15:46:36 +0200
From: raffaele.morelli at gmail.com
To: jawendell at suddenlink.net; openlayers-users at lists.osgeo.org
Subject: Re: [OpenLayers-Users] WFSGetFeatureInfo and	OpenLayers.Popup.FramedCloud

2013/5/10 Gery . <gamejihou at 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
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130510/d01e98ba/attachment-0001.html>


More information about the Users mailing list