map.getCenter() should return a cloned center, so that (for example)
transforming the center doesn't break the map. patch by edgemaster, r=me, (Closes #1853) git-svn-id: http://svn.openlayers.org/trunk/openlayers@8410 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1330,7 +1330,11 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* {<OpenLayers.LonLat>}
|
||||
*/
|
||||
getCenter: function () {
|
||||
return this.center;
|
||||
var center = null;
|
||||
if (this.center) {
|
||||
center = this.center.clone();
|
||||
}
|
||||
return center;
|
||||
},
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user