Allow custom tile size instead of the calculated one

This commit is contained in:
Emux
2017-09-29 19:37:39 +03:00
parent 02b29c7584
commit 233f0c4f7e
2 changed files with 7 additions and 1 deletions

View File

@@ -84,7 +84,8 @@ public class MapView extends GLSurfaceView {
DisplayMetrics metrics = getResources().getDisplayMetrics(); DisplayMetrics metrics = getResources().getDisplayMetrics();
CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI); CanvasAdapter.dpi = (int) (metrics.scaledDensity * CanvasAdapter.DEFAULT_DPI);
Tile.SIZE = Tile.calculateTileSize(); if (!Parameters.CUSTOM_TILE_SIZE)
Tile.SIZE = Tile.calculateTileSize();
/* Initialize the Map */ /* Initialize the Map */
mMap = new AndroidMap(this); mMap = new AndroidMap(this);

View File

@@ -16,6 +16,11 @@ package org.oscim.utils;
public final class Parameters { public final class Parameters {
/**
* Allow custom tile size instead of the calculated one.
*/
public static boolean CUSTOM_TILE_SIZE = false;
/** /**
* If true the <code>MapEventLayer2</code> will be used instead of default <code>MapEventLayer</code>. * If true the <code>MapEventLayer2</code> will be used instead of default <code>MapEventLayer</code>.
*/ */