From 495cef1691f28564b93669d165fb867c35e68238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Mon, 30 Oct 2017 21:25:56 +0100 Subject: [PATCH] render 257x257px tiles so they can overlap to avoid rendering bugs --- src/c3nav/mapdata/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/c3nav/mapdata/views.py b/src/c3nav/mapdata/views.py index d1f03690..fd0975f6 100644 --- a/src/c3nav/mapdata/views.py +++ b/src/c3nav/mapdata/views.py @@ -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)):