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
|
* translated into lon/lat bounds for the overview map
|
||||||
*/
|
*/
|
||||||
getMapBoundsFromRectBounds: function(pxBounds) {
|
getMapBoundsFromRectBounds: function(pxBounds) {
|
||||||
var leftBottomPx = new OpenLayers.Pixel(pxBounds.left,
|
var leftBottomLonLat = this.getLonLatFromOverviewPx({
|
||||||
pxBounds.bottom);
|
x: pxBounds.left,
|
||||||
var rightTopPx = new OpenLayers.Pixel(pxBounds.right,
|
y: pxBounds.bottom
|
||||||
pxBounds.top);
|
});
|
||||||
var leftBottomLonLat = this.getLonLatFromOverviewPx(leftBottomPx);
|
var rightTopLonLat = this.getLonLatFromOverviewPx({
|
||||||
var rightTopLonLat = this.getLonLatFromOverviewPx(rightTopPx);
|
x: pxBounds.right,
|
||||||
|
y: pxBounds.top
|
||||||
|
});
|
||||||
return new OpenLayers.Bounds(leftBottomLonLat.lon, leftBottomLonLat.lat,
|
return new OpenLayers.Bounds(leftBottomLonLat.lon, leftBottomLonLat.lat,
|
||||||
rightTopLonLat.lon, rightTopLonLat.lat);
|
rightTopLonLat.lon, rightTopLonLat.lat);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user