<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="font-size:10pt;" color="#366092" face="Arial" size="2"><br id="FontBreak"></font>try with something else than 0<br><br><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><br>__________________________________________________________________________________________<br>Piensa en el medio ambie<font style="" face="Arial">nte - mantenlo en la pantalla. NO lo imprimas si NO es necesario.</font></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><br></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2">Think green - keep it on the screen. Do NOT print if it is NOT necessary.</font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><br></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><span id="ecxresult_box" class="ecxshort_text" lang="de"><span class="ecxhps">Denken Sie an</span> <span class="ecxhps">die Umwelt</span></span></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><span id="ecxresult_box" lang="de"><span class="ecxhps"></span> <span class="ecxhps">-</span> <span class="ecxhps">bewahren Sie es</span> <span class="ecxhps">auf dem Bildschirm.</span> <span class="ecxhps">Drucken Sie es NICHT</span><span>, wenn</span> <span class="ecxhps">es NICHT notwendig ist</span><span>.</span></span></font><br><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Fri, 10 May 2013 15:46:36 +0200<br>From: raffaele.morelli@gmail.com<br>To: jawendell@suddenlink.net; openlayers-users@lists.osgeo.org<br>Subject: Re: [OpenLayers-Users] WFSGetFeatureInfo and   OpenLayers.Popup.FramedCloud<br><br>2013/5/10 Gery . <span dir="ltr"><<a href="mailto:gamejihou@hotmail.com" target="_blank">gamejihou@hotmail.com</a>></span><br><div class="ecxgmail_quote"><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">



<div><div dir="ltr"><font style="font-size:10pt;" color="#366092" face="Arial"><br></font>Hi Raffaele,<br><br>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:<br>
</div></div></blockquote><div><br></div><div><br></div><div><div>the request being made is not really a problem</div><div><br></div><div>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.</div>
</div><div><br></div><div>the problem is that event.features.length is always 0</div><div><br></div><div>code:</div><div><br></div><div><div>á á á á var info = new OpenLayers.Control.WMSGetFeatureInfo({</div><div>á á á á á á url: 'wmsserver',</div>
<div>á á á á á á title: 'Identify features by clicking',</div><div>á á á á á á queryVisible: true,</div><div>á á á á á á eventListeners: {</div><div>á á á á á á á á getfeatureinfo: function(event) {</div><div>á á á á á á á á á á var l = event.features.length;</div>
<div>á á á á á á á á á á alert(event.features.length+"-"+l)</div><div>á á á á á á á á á á if( event.features.length > 0 )</div><div>á á á á á á á á á á {</div><div>á á á á á á á á á á á á á á map.addPopup(new OpenLayers.Popup.FramedCloud(</div>
<div>á á á á á á á á á á á á á á á á "sostegno",</div><div>á á á á á á á á á á á á á á á á map.getLonLatFromPixel(event.xy),</div><div>á á á á á á á á á á á á á á á á null,</div><div>á á á á á á á á á á á á á á á á event.text,</div>
<div>á á á á á á á á á á á á á á á á null,</div><div>á á á á á á á á á á á á á á á á true</div><div>á á á á á á á á á á á á á á ));</div><div>á á á á á á á á á á }</div><div>á á á á á á á á }</div><div>á á á á á á }</div>
<div>á á á á });</div></div><div><br></div><div><br></div></div>
<br>_______________________________________________
Users mailing list
Users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users</div>                                      </div></body>
</html>