remove map.getSize call to avoid creating new instances

This commit is contained in:
fredj
2012-01-12 13:32:09 +01:00
committed by Frederic Junod
parent b8257aa64c
commit 2355f099be

View File

@@ -1713,7 +1713,7 @@ OpenLayers.Map = OpenLayers.Class({
*/
adjustZoom: function(zoom) {
var resolution, resolutions = this.baseLayer.resolutions,
maxResolution = this.getMaxExtent().getWidth() / this.getSize().w;
maxResolution = this.getMaxExtent().getWidth() / this.size.w;
if (this.getResolutionForZoom(zoom) > maxResolution) {
for (var i=zoom|0, ii=resolutions.length; i<ii; ++i) {
if (resolutions[i] <= maxResolution) {