Quote indexes into array.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1161 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -18,10 +18,8 @@ OpenLayers.Layer.KaMap.prototype =
|
||||
isBaseLayer: true,
|
||||
|
||||
units: 'degrees',
|
||||
scales: {inches: 1, feet: 12, miles: 63360.0, meters: 39.3701, kilometers: 39370.1, degrees: 4374754},
|
||||
|
||||
|
||||
resolution: 72,
|
||||
resolution: OpenLayers.DOTS_PER_INCH,
|
||||
|
||||
DEFAULT_PARAMS: {
|
||||
i: 'jpeg',
|
||||
@@ -57,7 +55,10 @@ OpenLayers.Layer.KaMap.prototype =
|
||||
var zoom = this.map.getZoom();
|
||||
var maxRes = this.map.maxResolution;
|
||||
var mapRes = this.map.getResolution();
|
||||
var scale = Math.round( (((this.tileSize.w * this.map.maxResolution * this.resolution) * (this.scales[this.units])) / this.tileSize.w) / Math.pow(2, zoom) * 10000 ) / 10000;
|
||||
var scale = Math.round( (((this.tileSize.w * this.map.maxResolution * this.resolution) *
|
||||
(OpenLayers.INCHES_PER_UNIT[this.units])) /
|
||||
this.tileSize.w)
|
||||
/ Math.pow(2, zoom) * 10000 ) / 10000;
|
||||
|
||||
var cellSize = new OpenLayers.Size(mapRes*this.tileSize.w, mapRes*this.tileSize.h);
|
||||
var pX = Math.round(((bounds.left) / cellSize.w) * this.tileSize.w);
|
||||
|
||||
Reference in New Issue
Block a user