replace Pixel argument with simple object (OverviewMap.getLonLatFromOverviewPx)
This commit is contained in:
@@ -659,12 +659,14 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
||||
* translated into lon/lat bounds for the overview map
|
||||
*/
|
||||
getMapBoundsFromRectBounds: function(pxBounds) {
|
||||
var leftBottomPx = new OpenLayers.Pixel(pxBounds.left,
|
||||
pxBounds.bottom);
|
||||
var rightTopPx = new OpenLayers.Pixel(pxBounds.right,
|
||||
pxBounds.top);
|
||||
var leftBottomLonLat = this.getLonLatFromOverviewPx(leftBottomPx);
|
||||
var rightTopLonLat = this.getLonLatFromOverviewPx(rightTopPx);
|
||||
var leftBottomLonLat = this.getLonLatFromOverviewPx({
|
||||
x: pxBounds.left,
|
||||
y: pxBounds.bottom
|
||||
});
|
||||
var rightTopLonLat = this.getLonLatFromOverviewPx({
|
||||
x: pxBounds.right,
|
||||
y: pxBounds.top
|
||||
});
|
||||
return new OpenLayers.Bounds(leftBottomLonLat.lon, leftBottomLonLat.lat,
|
||||
rightTopLonLat.lon, rightTopLonLat.lat);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user