you may try some thing like popupdestroy<br><br>see this example <br><br><a href="http://openlayers.org/dev/examples/sundials.html">http://openlayers.org/dev/examples/sundials.html</a><br><br>or<br><br>map.removePopup(map.popups[0]);<br>
<br>---------------------------------------------------------------------------------------------------------------------------------------<br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 7:02 PM, Gery . <span dir="ltr"><<a href="mailto:gamejihou@hotmail.com" target="_blank">gamejihou@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You mean you click on the map, the popup opens, then you click again on the map and before the new popup appears, the previous popup should close automatically, is that what you meant?<br>

<br>
Sent from my iBath<br>
<div class="HOEnZb"><div class="h5"><br>
On Feb 19, 2013, at 13:36, "Aditya Kumar" <<a href="mailto:paglacontact@yahoo.com">paglacontact@yahoo.com</a>> wrote:<br>
<br>
Dear Users,<br>
 I just went through the example for getfeature info.<br>
I am getting the popup fine.But the popup are coming multiple time i.e every<br>
click new pop up and its not going automatically.<br>
<br>
var    info = new OpenLayers.Control.WMSGetFeatureInfo({<br>
          url: 'url',<br>
          title: 'Identify features by clicking',<br>
          queryVisible: true,<br>
          eventListeners: {<br>
              getfeatureinfo: function(event) {<br>
                  map.addPopup(new OpenLayers.Popup.FramedCloud(<br>
                      "chicken",<br>
                      //document.getElementById('get').innerHTML =<br>
xmlResponse.attribute.state;<br>
                      map.getLonLatFromPixel(event.xy),<br>
                      null,<br>
                      event.text,<br>
                      null,<br>
                      true<br>
                  ));<br>
                                      // xmlResponse = new<br>
OpenLayers.Format.XML().read(event.text);<br>
                  //document.getElementById('get').innerHTML =<br>
xmlResponse.attribute.type;<br>
              }<br>
          }<br>
      });<br>
      map.addControl(info);<br>
      info.activate();<br>
<br>
Kindly help how to close the last popup on a new click.<br>
<br>
<br>
Aditya Kumar<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/WMS-getfeature-info-multiple-popup-tp5035175.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/WMS-getfeature-info-multiple-popup-tp5035175.html</a><br>

Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Arulraj Murugavel<br>