diff --git a/src/org/oscim/generator/TileGenerator.java b/src/org/oscim/generator/TileGenerator.java index 1a195935..3ea673c4 100644 --- a/src/org/oscim/generator/TileGenerator.java +++ b/src/org/oscim/generator/TileGenerator.java @@ -143,8 +143,8 @@ public class TileGenerator implements IRenderCallback, IMapDatabaseCallback { tile = mTile = (MapTile) jobTile; - mDebugDrawPolygons = !debug.mDisablePolygons; - mDebugDrawUnmatched = debug.mDrawUnmatchted; + mDebugDrawPolygons = !debug.disablePolygons; + mDebugDrawUnmatched = debug.debugTheme; if (tile.layers != null) { // should be fixed now. @@ -172,11 +172,11 @@ public class TileGenerator implements IRenderCallback, IMapDatabaseCallback { return false; } - if (debug.mDrawTileFrames) { - mTagName = new Tag("name", tile.toString(), false); - mPoiX = Tile.TILE_SIZE >> 1; - mPoiY = 10; - TileGenerator.renderTheme.matchNode(this, debugTagWay, (byte) 0); + if (debug.drawTileFrames) { + //mTagName = new Tag("name", tile.toString(), false); + //mPoiX = Tile.TILE_SIZE >> 1; + //mPoiY = 10; + //TileGenerator.renderTheme.matchNode(this, debugTagWay, (byte) 0); mIndices = debugBoxIndex; if (MapView.enableClosePolygons) diff --git a/src/org/oscim/view/DebugSettings.java b/src/org/oscim/view/DebugSettings.java index b77525e1..486a0ecc 100644 --- a/src/org/oscim/view/DebugSettings.java +++ b/src/org/oscim/view/DebugSettings.java @@ -22,19 +22,21 @@ public class DebugSettings { /** * True if drawing of tile coordinates is enabled, false otherwise. */ - public final boolean mDrawTileCoordinates; + public final boolean drawTileCoordinates; /** * True if drawing of tile frames is enabled, false otherwise. */ - public final boolean mDrawTileFrames; + public final boolean drawTileFrames; - public final boolean mDrawUnmatchted; + public final boolean debugTheme; /** * True if highlighting of water tiles is enabled, false otherwise. */ - public final boolean mDisablePolygons; + public final boolean disablePolygons; + + public final boolean debugLabels; /** * @param drawTileCoordinates @@ -43,14 +45,24 @@ public class DebugSettings { * if drawing of tile frames is enabled. * @param disablePolygons * if highlighting of water tiles is enabled. - * @param drawUnmatched + * @param debugTheme * ... + * @param debugLabels ... */ public DebugSettings(boolean drawTileCoordinates, boolean drawTileFrames, - boolean disablePolygons, boolean drawUnmatched) { - mDrawTileCoordinates = drawTileCoordinates; - mDrawTileFrames = drawTileFrames; - mDrawUnmatchted = drawUnmatched; - mDisablePolygons = disablePolygons; + boolean disablePolygons, boolean debugTheme, boolean debugLabels) { + this.drawTileCoordinates = drawTileCoordinates; + this.drawTileFrames = drawTileFrames; + this.debugTheme = debugTheme; + this.disablePolygons = disablePolygons; + this.debugLabels = debugLabels; + } + + public DebugSettings() { + this.drawTileCoordinates = false; + this.drawTileFrames = false; + this.debugTheme = false; + this.disablePolygons = false; + this.debugLabels = false; } } diff --git a/src/org/oscim/view/MapView.java b/src/org/oscim/view/MapView.java index 9285c9f5..7180935c 100644 --- a/src/org/oscim/view/MapView.java +++ b/src/org/oscim/view/MapView.java @@ -163,7 +163,7 @@ public class MapView extends RelativeLayout { mMapWorkers = new MapWorker[mNumMapWorkers]; - mDebugSettings = new DebugSettings(false, false, false, false); + mDebugSettings = new DebugSettings(); TileGenerator.setDebugSettings(mDebugSettings); for (int i = 0; i < mNumMapWorkers; i++) { @@ -266,7 +266,7 @@ public class MapView extends RelativeLayout { // render(); if (AndroidUtils.currentThreadIsUiThread()) { - boolean changed = mMapViewPosition.getMapPosition(mMapPosition, null); + boolean changed = mMapViewPosition.getMapPosition(mMapPosition); mOverlayManager.onUpdate(mMapPosition, changed); }