TileCache.js uses math.floor instead of math.round like TC does.

Thanks Brent. (Closes #1261)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5745 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-01-15 12:19:22 +00:00
parent df3d4b2d98
commit c1185e8f8b

View File

@@ -103,8 +103,8 @@ OpenLayers.Layer.TileCache = OpenLayers.Class(OpenLayers.Layer.Grid, {
var res = this.map.getResolution();
var bbox = this.maxExtent;
var size = this.tileSize;
var tileX = Math.floor((bounds.left - bbox.left) / (res * size.w));
var tileY = Math.floor((bounds.bottom - bbox.bottom) / (res * size.h));
var tileX = Math.round((bounds.left - bbox.left) / (res * size.w));
var tileY = Math.round((bounds.bottom - bbox.bottom) / (res * size.h));
var tileZ = this.map.zoom;
/**
* Zero-pad a positive integer.