add labeling debug option
This commit is contained in:
parent
b3d708bd36
commit
8db24eaacf
@ -143,8 +143,8 @@ public class TileGenerator implements IRenderCallback, IMapDatabaseCallback {
|
|||||||
|
|
||||||
tile = mTile = (MapTile) jobTile;
|
tile = mTile = (MapTile) jobTile;
|
||||||
|
|
||||||
mDebugDrawPolygons = !debug.mDisablePolygons;
|
mDebugDrawPolygons = !debug.disablePolygons;
|
||||||
mDebugDrawUnmatched = debug.mDrawUnmatchted;
|
mDebugDrawUnmatched = debug.debugTheme;
|
||||||
|
|
||||||
if (tile.layers != null) {
|
if (tile.layers != null) {
|
||||||
// should be fixed now.
|
// should be fixed now.
|
||||||
@ -172,11 +172,11 @@ public class TileGenerator implements IRenderCallback, IMapDatabaseCallback {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug.mDrawTileFrames) {
|
if (debug.drawTileFrames) {
|
||||||
mTagName = new Tag("name", tile.toString(), false);
|
//mTagName = new Tag("name", tile.toString(), false);
|
||||||
mPoiX = Tile.TILE_SIZE >> 1;
|
//mPoiX = Tile.TILE_SIZE >> 1;
|
||||||
mPoiY = 10;
|
//mPoiY = 10;
|
||||||
TileGenerator.renderTheme.matchNode(this, debugTagWay, (byte) 0);
|
//TileGenerator.renderTheme.matchNode(this, debugTagWay, (byte) 0);
|
||||||
|
|
||||||
mIndices = debugBoxIndex;
|
mIndices = debugBoxIndex;
|
||||||
if (MapView.enableClosePolygons)
|
if (MapView.enableClosePolygons)
|
||||||
|
@ -22,19 +22,21 @@ public class DebugSettings {
|
|||||||
/**
|
/**
|
||||||
* True if drawing of tile coordinates is enabled, false otherwise.
|
* 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.
|
* 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.
|
* True if highlighting of water tiles is enabled, false otherwise.
|
||||||
*/
|
*/
|
||||||
public final boolean mDisablePolygons;
|
public final boolean disablePolygons;
|
||||||
|
|
||||||
|
public final boolean debugLabels;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param drawTileCoordinates
|
* @param drawTileCoordinates
|
||||||
@ -43,14 +45,24 @@ public class DebugSettings {
|
|||||||
* if drawing of tile frames is enabled.
|
* if drawing of tile frames is enabled.
|
||||||
* @param disablePolygons
|
* @param disablePolygons
|
||||||
* if highlighting of water tiles is enabled.
|
* if highlighting of water tiles is enabled.
|
||||||
* @param drawUnmatched
|
* @param debugTheme
|
||||||
* ...
|
* ...
|
||||||
|
* @param debugLabels ...
|
||||||
*/
|
*/
|
||||||
public DebugSettings(boolean drawTileCoordinates, boolean drawTileFrames,
|
public DebugSettings(boolean drawTileCoordinates, boolean drawTileFrames,
|
||||||
boolean disablePolygons, boolean drawUnmatched) {
|
boolean disablePolygons, boolean debugTheme, boolean debugLabels) {
|
||||||
mDrawTileCoordinates = drawTileCoordinates;
|
this.drawTileCoordinates = drawTileCoordinates;
|
||||||
mDrawTileFrames = drawTileFrames;
|
this.drawTileFrames = drawTileFrames;
|
||||||
mDrawUnmatchted = drawUnmatched;
|
this.debugTheme = debugTheme;
|
||||||
mDisablePolygons = disablePolygons;
|
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];
|
mMapWorkers = new MapWorker[mNumMapWorkers];
|
||||||
|
|
||||||
mDebugSettings = new DebugSettings(false, false, false, false);
|
mDebugSettings = new DebugSettings();
|
||||||
TileGenerator.setDebugSettings(mDebugSettings);
|
TileGenerator.setDebugSettings(mDebugSettings);
|
||||||
|
|
||||||
for (int i = 0; i < mNumMapWorkers; i++) {
|
for (int i = 0; i < mNumMapWorkers; i++) {
|
||||||
@ -266,7 +266,7 @@ public class MapView extends RelativeLayout {
|
|||||||
// render();
|
// render();
|
||||||
|
|
||||||
if (AndroidUtils.currentThreadIsUiThread()) {
|
if (AndroidUtils.currentThreadIsUiThread()) {
|
||||||
boolean changed = mMapViewPosition.getMapPosition(mMapPosition, null);
|
boolean changed = mMapViewPosition.getMapPosition(mMapPosition);
|
||||||
|
|
||||||
mOverlayManager.onUpdate(mMapPosition, changed);
|
mOverlayManager.onUpdate(mMapPosition, changed);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user