[OpenLayers-Users] WMS getfeature info multiple popup

Arulraj Murugavel (மு. அருள்ராஜ் ) arulraj.mu at gmail.com
Tue Feb 19 06:05:40 PST 2013


you may try some thing like popupdestroy

see this example

http://openlayers.org/dev/examples/sundials.html

or

map.removePopup(map.popups[0]);

---------------------------------------------------------------------------------------------------------------------------------------

On Tue, Feb 19, 2013 at 7:02 PM, Gery . <gamejihou at hotmail.com> wrote:

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



-- 
Arulraj Murugavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130219/fe4a7a73/attachment.html>


More information about the Users mailing list