remove map.getSize call to avoid creating new instances
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user