dbg: VectorTileLayer

This commit is contained in:
Hannes Janetzek 2014-04-27 22:20:47 +02:00
parent b509e3c8d1
commit b75a3712d5

View File

@ -117,10 +117,11 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
/* query data source, which calls process() callback */ /* query data source, which calls process() callback */
mTileDataSource.query(tile, this); mTileDataSource.query(tile, this);
} catch (NullPointerException e) { } catch (NullPointerException e) {
log.debug("{} {}", tile, e.getMessage()); log.debug("NPE {} {}", tile, e.getMessage());
e.printStackTrace(); e.printStackTrace();
} catch (Exception e) { } catch (Exception e) {
log.debug("{} {}", tile, e.getMessage()); log.debug("{} {}", tile, e.getMessage());
e.printStackTrace();
return false; return false;
} }
return true; return true;
@ -191,22 +192,25 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
clearState(); clearState();
} }
//protected void debugUnmatched(boolean closed, TagSet tags) { // private final static LineStyle DEBUG_LINE =
// log.debug("DBG way not matched: " + closed + " " // new LineStyle(Integer.MAX_VALUE / 12, Color.MAGENTA, 1.2f);
// + Arrays.deepToString(tags));
// //
// mTagName = new Tag("name", tags[0].key + ":" // private final static TextStyle DEBUG_TEXT = new TextBuilder()
// + tags[0].value, false); // .setFontSize(12)
// // .setColor(Color.RED)
// mElement.tags = closed ? debugTagArea : debugTagWay; // .setCaption(true)
// RenderInstruction[] ri = renderTheme.matchElement(mElement, mTile.zoomLevel); // .setTextKey(Tag.KEY_NAME)
// renderWay(ri); // .build();
//}
protected void renderWay(RenderStyle[] style) { protected void renderWay(RenderStyle[] style) {
if (style == null) if (style == null) {
// DEBUG_LINE.renderWay(this);
// String t = mElement.tags.toString();
// mElement.tags.clear();
// mElement.tags.add(new Tag(Tag.KEY_NAME, t));
// DEBUG_TEXT.renderWay(this);
return; return;
}
for (int i = 0, n = style.length; i < n; i++) for (int i = 0, n = style.length; i < n; i++)
style[i].renderWay(this); style[i].renderWay(this);
} }