Quote indexes into array.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1161 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-08-09 15:52:23 +00:00
parent a6edeb64b5
commit e3df606001
3 changed files with 25 additions and 15 deletions

View File

@@ -98,6 +98,13 @@ OpenLayers.Map.prototype = {
/** @type OpenLayers.Size */
tileSize: null,
/** @type String */
units: 'degrees',
/** @type Float */
minScale: null,
/**
* @constructor
@@ -203,14 +210,16 @@ OpenLayers.Map.prototype = {
// if maxResolution is specified as "auto", calculate it
// based on the maxExtent and the viewSize
//
if (this.maxResolution == "auto" || this.maxResolution == null) {
if (this.maxResolution == null && this.minScale) {
this.maxResolution = OpenLayers.Util.getResolutionFromScale(this.minScale, this.units);
} else if (this.maxResolution == "auto" || this.maxResolution == null) {
var maxExtent = this.getMaxExtent();
var viewSize = this.getSize();
this.maxResolution = Math.max(maxExtent.getWidth() / viewSize.w,
maxExtent.getHeight() / viewSize.h );
}
},
/**
@@ -675,7 +684,7 @@ OpenLayers.Map.prototype = {
* @type String
*/
getMaxResolution: function() {
var maxResolution = null
var maxResolution = null;
if (this.baseLayer != null) {
maxResolution = this.baseLayer.getMaxResolution();