give Popup an 'updatePosition()' function that allows it to re-position itself. This will be used for zoom changes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@350 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -103,6 +103,17 @@ OpenLayers.Popup.prototype = {
|
||||
return this.div;
|
||||
},
|
||||
|
||||
/**
|
||||
* if the popup has a lonlat and its map members set,
|
||||
* then have it move itself to its proper position
|
||||
*/
|
||||
updatePosition: function() {
|
||||
if ((this.lonlat) && (this.map)) {
|
||||
px = this.map.getLayerPxFromLonLat(this.lonlat);
|
||||
this.moveTo(px);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user