add labeling debug option
This commit is contained in:
parent
b3d708bd36
commit
8db24eaacf
src/org/oscim
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user