diff --git a/tilecache/TileCache/Layer.py b/tilecache/TileCache/Layer.py index 2168fb6..e919803 100644 --- a/tilecache/TileCache/Layer.py +++ b/tilecache/TileCache/Layer.py @@ -478,7 +478,7 @@ def getLevel (self, res, size = [256, 256]): ## (3, 1, 2) ############################################################################ - def getCell (self, (minx, miny, maxx, maxy), exact = True): + def getCell (self, (minx, miny, maxx, maxy), exact = False): """ Returns x, y, z @@ -510,8 +510,8 @@ def getCell (self, (minx, miny, maxx, maxy), exact = True): x0 = (minx - self.bbox[0]) / (res * self.size[0]) y0 = (miny - self.bbox[1]) / (res * self.size[1]) - x = round(x0) - y = round(y0) + x = int(round(x0)) + y = int(round(y0)) tilex = ((x * res * self.size[0]) + self.bbox[0]) tiley = ((y * res * self.size[1]) + self.bbox[1])