Hi,

I have the next code to show a popup when a user clicks over the map:


info = new OpenLayers.Control.WMSGetFeatureInfo({
url : 'http://localhost:9000/cgi-bin/mapserv.exe',
title : ' ',
layers : [ StatesWms ],
queryVisible : true,
vendorParams : {
map : '/ms4w/apps/demo-cv/demoCV.map'
},
eventListeners : {
'getfeatureinfo' : function(event) {
var popup = new
OpenLayers.Popup.FramedCloud("Datos",map.getLonLatFromPixel(event.xy),
null, event.text, null, true);
  popup.autoSize = true;
map.addPopup(popup);
}
}
});

map.addControl(info);
info.activate();

When I click over the map, the popup with the correct information appears
at the web client, but I want that if I click in another point, the first
popup will be closed and the new will be open. Some help?

Thanks
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to