And it helps if you do the order of operations right so that the figures

are not rounded to integers, really.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1342 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-08-23 21:04:14 +00:00
parent 0500b9cba2
commit 7ca9d2ec83

View File

@@ -49,7 +49,7 @@ OpenLayers.Layer.KaMap.prototype =
*/
getURL: function (bounds) {
var mapRes = this.map.getResolution();
var scale = Math.round((this.map.getScale() * 10000) / 10000);
var scale = Math.round((this.map.getScale() * 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);
var pY = -Math.round(((bounds.top) / cellSize.h) * this.tileSize.h);