render 257x257px tiles so they can overlap to avoid rendering bugs

This commit is contained in:
Laura Klünder 2017-10-30 21:25:56 +01:00
parent c62fe54893
commit 495cef1691

View file

@ -32,6 +32,10 @@ def tile(request, level, zoom, x, y, format):
maxx = minx + size
maxy = miny + size
# add one pixel so tiles can overlap to avoid rendering bugs in chrome or webkit
maxx += size / 256
miny -= size / 256
# error 404 if tiles is out of bounds
bounds = Source.max_bounds()
if not box(*chain(*bounds)).intersects(box(minx, miny, maxx, maxy)):