From 51eae28926d6b11bd24cf2508695471c7a95e26b Mon Sep 17 00:00:00 2001 From: Emux Date: Sun, 13 Nov 2016 16:27:24 +0200 Subject: [PATCH] MapDatabase: use TileClipper buffer based on dpi, #231 --- vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java b/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java index 2d8be832..37e67c10 100644 --- a/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java +++ b/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java @@ -19,6 +19,7 @@ */ package org.oscim.tiling.source.mapfile; +import org.oscim.backend.CanvasAdapter; import org.oscim.core.GeometryBuffer.GeometryType; import org.oscim.core.MapElement; import org.oscim.core.MercatorProjection; @@ -383,8 +384,8 @@ public class MapDatabase implements ITileDataSource { //log.debug(numCols + "/" + numRows + " " + mCurrentCol + " " + mCurrentRow); - // Buffer is half the tile size - int buffer = Tile.SIZE / 2; + // Buffer based on dpi + int buffer = (int) (16 * CanvasAdapter.dpi / CanvasAdapter.DEFAULT_DPI + 0.5f); xmin = -buffer; ymin = -buffer;