[OpenLayers-Users] Re: Destroying old popup before crating new one

Francesc Cañas kikocanas at gmail.com
Fri Feb 17 07:47:50 EST 2012


Hi, where I have to put the code? I've tried but unsuccess...


selecciona = new OpenLayers.Control.WMSGetFeatureInfo({ 
            url: 'http://localhost:8080/geoserver/AUMA/wms', 
            title: 'Identify features by clicking', 
            queryVisible: true, 
            eventListeners: { 
               getfeatureinfo: function(event) { 
                  map.addPopup(new OpenLayers.Popup.FramedCloud( 
                        "Projectes", 
                        map.getLonLatFromPixel(event.xy), 
                        null, 
                        event.text, 
                        null, 
                        true 
                    					
					)); 
                } 
            } 
        });

	while (map.popups.length > 0) { 
    map.removePopup(map.popups[0]);}

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Destroying-old-popup-before-crating-new-one-tp3911804p4479948.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list