replace map.minPx and map.maxPx with simple objects
This commit is contained in:
@@ -1833,10 +1833,14 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
var latDelta = maxExtentCenter.lat - this.center.lat;
|
||||
var extentWidth = Math.round(maxExtent.getWidth() / res);
|
||||
var extentHeight = Math.round(maxExtent.getHeight() / res);
|
||||
var left = (this.size.w - extentWidth) / 2 - lonDelta / res;
|
||||
var top = (this.size.h - extentHeight) / 2 - latDelta / res;
|
||||
this.minPx = new OpenLayers.Pixel(left, top);
|
||||
this.maxPx = new OpenLayers.Pixel(left + extentWidth, top + extentHeight);
|
||||
this.minPx = {
|
||||
x: (this.size.w - extentWidth) / 2 - lonDelta / res,
|
||||
y: (this.size.h - extentHeight) / 2 - latDelta / res
|
||||
};
|
||||
this.maxPx = {
|
||||
x: this.minPx.x + Math.round(maxExtent.getWidth() / res),
|
||||
y: this.minPx.y + Math.round(maxExtent.getHeight() / res)
|
||||
};
|
||||
}
|
||||
|
||||
if (zoomChanged) {
|
||||
|
||||
Reference in New Issue
Block a user