Enforcing existing zoomToExtent behavior.
The Map.html and WrapDateLine.html tests that check zoomToExtent were failing with the changes to this method. These test changes make the expectations more explicit. It is inconsistent to call wrapDateLine only in zoomToExtent, but this is the minimum change to get the tests passing again. It would be more consistent to call wrapDateLine in the setCenter sequence.
This commit is contained in:
@@ -2226,7 +2226,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
// we got from it was wrong. So we take our new bounds and ask it
|
||||
// for the center.
|
||||
//
|
||||
center = bounds.getCenterLonLat();
|
||||
center = bounds.getCenterLonLat().wrapDateLine(maxExtent);
|
||||
}
|
||||
this.setCenter(center, this.getZoomForExtent(bounds, closest));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user