replace Pixel argument with simple object (Map.getLonLatFromViewPortPx)

This commit is contained in:
fredj
2012-01-06 13:53:24 +01:00
committed by Frederic Junod
parent 1df5cfa158
commit 8ef0ad8c17
2 changed files with 14 additions and 19 deletions
+4 -3
View File
@@ -1517,9 +1517,10 @@ OpenLayers.Map = OpenLayers.Class({
*/
getCachedCenter: function() {
if (!this.center && this.size) {
this.center = this.getLonLatFromViewPortPx(
new OpenLayers.Pixel(this.size.w / 2, this.size.h / 2)
);
this.center = this.getLonLatFromViewPortPx({
x: this.size.w / 2,
y: this.size.h / 2
});
}
return this.center;
},