[OpenLayers-Users] WMS getfeature info multiple popup
Gery .
gamejihou at hotmail.com
Tue Feb 19 05:32:22 PST 2013
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
More information about the Users
mailing list