allow an option to kill all other popups on addition of new one
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1004 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+10
-1
@@ -357,8 +357,17 @@ OpenLayers.Map.prototype = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {OpenLayers.Popup} popup
|
* @param {OpenLayers.Popup} popup
|
||||||
|
* @param {Boolean} exclusive If true, closes all other popups first
|
||||||
*/
|
*/
|
||||||
addPopup: function(popup) {
|
addPopup: function(popup, exclusive) {
|
||||||
|
|
||||||
|
if (exclusive) {
|
||||||
|
//remove all other popups from screen
|
||||||
|
for(var i=0; i < this.popups.length; i++) {
|
||||||
|
this.removePopup(this.popups[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
popup.map = this;
|
popup.map = this;
|
||||||
this.popups.push(popup);
|
this.popups.push(popup);
|
||||||
var popupDiv = popup.draw();
|
var popupDiv = popup.draw();
|
||||||
|
|||||||
Reference in New Issue
Block a user