Round the scale value. KaMap rounds internally, so adding extra precision here only breaks client-side caching.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@766 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-06-26 14:29:37 +00:00
parent 3546cad5a1
commit 05025e97d0

View File

@@ -42,7 +42,7 @@ OpenLayers.Layer.KaMap.prototype =
var zoom = this.map.getZoom();
var maxRes = this.map.maxResolution;
var mapRes = this.map.getResolution();
var scale = (((this.tileSize.w * this.map.maxResolution * this.resolution) * (this.scales[this.units])) / this.tileSize.w) / Math.pow(2, zoom);
var scale = Math.round((((this.tileSize.w * this.map.maxResolution * this.resolution) * (this.scales[this.units])) / this.tileSize.w) / Math.pow(2, zoom));
var cellSize = new OpenLayers.Size(mapRes*this.tileSize.w, mapRes*this.tileSize.h);
var pX = Math.floor(((bounds.left) / cellSize.w) * this.tileSize.w);