[OpenLayers-Users] WMS getfeature info multiple popup

Aditya Kumar paglacontact at yahoo.com
Wed Feb 20 02:34:40 PST 2013


Dear Arulraj,
   Thanks. Its wokring fine. :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) 

 var    info = new OpenLayers.Control.WMSGetFeatureInfo({
           url: 'wmsurl',                                   
           title: 'Identify features by clicking',
           queryVisible: true,
           eventListeners: {
               getfeatureinfo: function(event) {
               popupClear();
                   map.addPopup(new OpenLayers.Popup.FramedCloud(
                       "chicken",               
                       //document.getElementById('get').innerHTML =
xmlResponse.attribute.state;
                       map.getLonLatFromPixel(event.xy),
                       null,
                       event.text,
                       null,
                       true
                   ));
               }
           }
       });
       map.addControl(info);
       info.activate();
     
            
    map.removeControl(new OpenLayers.Control.LayerSwitcher());
// map.addControl(new OpenLayers.Control.PanZoomBar());
    map.addControl(new OpenLayers.Control.Attribution());
  }
function popupClear() {
    //alert('number of popups '+map.popups.length);
    while( map.popups.length ) {
         map.removePopup(map.popups[0]);
    }
}


Aditya kumar
India Urban Space Foundation



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/WMS-getfeature-info-multiple-popup-tp5035175p5035446.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list