Mapsforge: at large query zoom levels enlarge clip buffer, fixes #231

This commit is contained in:
Emux
2017-09-06 11:16:23 +03:00
parent f1634e4976
commit f63c303293
2 changed files with 7 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
- Mapsforge themes compatibility [#100](https://github.com/mapsforge/vtm/issues/100)
- Render themes: line symbol [#124](https://github.com/mapsforge/vtm/issues/124)
- Render themes: stroke dash array [#131](https://github.com/mapsforge/vtm/issues/131)
- Mapsforge fix artifacts for zoom > 17 [#231](https://github.com/mapsforge/vtm/issues/231)
- vtm-theme-comparator module [#387](https://github.com/mapsforge/vtm/issues/387)
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.9.0)

View File

@@ -372,8 +372,12 @@ public class MapDatabase implements ITileDataSource {
//log.debug(numCols + "/" + numRows + " " + mCurrentCol + " " + mCurrentRow);
// Buffer based on dpi
int buffer = (int) (16 * CanvasAdapter.dpi / CanvasAdapter.DEFAULT_DPI + 0.5f);
// At large query zoom levels use enlarged buffer
int buffer;
if (queryParameters.queryZoomLevel > MapFileTileSource.MAX_ZOOM_LEVEL)
buffer = Tile.SIZE / 2;
else
buffer = (int) (16 * CanvasAdapter.dpi / CanvasAdapter.DEFAULT_DPI + 0.5f);
xmin = -buffer;
ymin = -buffer;