popup doesnt want a reference back to the map, it wants a reference to the div that it was added to. this we will call 'parent'. with this reference, it will be able to destroy itself
git-svn-id: http://svn.openlayers.org/trunk/openlayers@229 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -151,7 +151,7 @@ OpenLayers.Map.prototype = {
|
|||||||
* @param {OpenLayers.Popup} popup
|
* @param {OpenLayers.Popup} popup
|
||||||
*/
|
*/
|
||||||
addPopup: function(popup) {
|
addPopup: function(popup) {
|
||||||
popup.map = this;
|
popup.parent = this.viewPortDiv;
|
||||||
this.popups.push(popup);
|
this.popups.push(popup);
|
||||||
var popupDiv = popup.draw();
|
var popupDiv = popup.draw();
|
||||||
if (popupDiv) {
|
if (popupDiv) {
|
||||||
|
|||||||
Reference in New Issue
Block a user