From 05025e97d021f7a21bfb6c20e9de1ff00f706d62 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 26 Jun 2006 14:29:37 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Layer/KaMap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/KaMap.js b/lib/OpenLayers/Layer/KaMap.js index ad32b67201..6fb15c8ce7 100644 --- a/lib/OpenLayers/Layer/KaMap.js +++ b/lib/OpenLayers/Layer/KaMap.js @@ -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);