oscim.core.Tag: cleanups

- consistent String constants
This commit is contained in:
Hannes Janetzek
2013-09-25 05:50:54 +02:00
parent 2db1cf8b6c
commit c05710fcdb
9 changed files with 71 additions and 82 deletions

View File

@@ -68,8 +68,8 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
// replacement for variable value tags that should not be matched by RenderTheme
// FIXME make this general, maybe subclass tags
private static final Tag mTagEmptyName = new Tag(Tag.TAG_KEY_NAME, null, false);
private static final Tag mTagEmptyHouseNr = new Tag(Tag.TAG_KEY_HOUSE_NUMBER, null, false);
private static final Tag mTagEmptyName = new Tag(Tag.KEY_NAME, null, false);
private static final Tag mTagEmptyHouseNr = new Tag(Tag.KEY_HOUSE_NUMBER, null, false);
private IRenderTheme renderTheme;
private int renderLevels;
@@ -208,12 +208,12 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
for (int i = 0; i < in.numTags; i++) {
String key = tags[i].key;
if (key == Tag.TAG_KEY_NAME) {
if (key == Tag.KEY_NAME) {
if (tags[i].value != null) {
mTagName = tags[i];
tags[i] = mTagEmptyName;
}
} else if (key == Tag.TAG_KEY_HOUSE_NUMBER) {
} else if (key == Tag.KEY_HOUSE_NUMBER) {
if (tags[i].value != null) {
mTagHouseNr = tags[i];
tags[i] = mTagEmptyHouseNr;
@@ -221,7 +221,7 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
} else if (mTile.zoomLevel > 16) {
// FIXME, allow overlays to intercept
// this, or use a theme option for this
if (key == Tag.TAG_KEY_BUILDING)
if (key == Tag.KEY_BUILDING)
mRenderBuildingModel = true;
else if (key == Tag.KEY_HEIGHT) {
try {
@@ -381,10 +381,10 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
private String textValueForKey(Text text) {
String value = null;
if (text.textKey == Tag.TAG_KEY_NAME) {
if (text.textKey == Tag.KEY_NAME) {
if (mTagName != null)
value = mTagName.value;
} else if (text.textKey == Tag.TAG_KEY_HOUSE_NUMBER) {
} else if (text.textKey == Tag.KEY_HOUSE_NUMBER) {
if (mTagHouseNr != null)
value = mTagHouseNr.value;
}