diff --git a/lib/OpenLayers/Popup/Anchored.js b/lib/OpenLayers/Popup/Anchored.js index 44130cc277..c27569a083 100644 --- a/lib/OpenLayers/Popup/Anchored.js +++ b/lib/OpenLayers/Popup/Anchored.js @@ -78,6 +78,18 @@ OpenLayers.Popup.Anchored.prototype = OpenLayers.Popup.prototype.moveTo.apply(this, newArguments); }, + /** + * @param {OpenLayers.Size} size + */ + setSize:function(size) { + OpenLayers.Popup.prototype.setSize.apply(this, arguments); + + if ((this.lonlat) && (this.map)) { + var px = this.map.getLayerPxFromLonLat(this.lonlat); + this.moveTo(px); + } + }, + /** * @private *