Add default comment

This commit is contained in:
PavelRatushny 2017-07-17 19:56:39 +03:00
parent ceb3973cfb
commit 8a1d8b83cb

View file

@ -117,7 +117,12 @@ public class OpenstreetmapsDbHelper extends SQLiteOpenHelper {
}
p.setEntity(entity);
p.setAction(query.getString(3));
p.setComment(query.getString(4));
String comment = query.getString(4);
if (comment.equals("")) {
String action = OsmPoint.stringAction.get(p.getAction());
comment = action.substring(0, 1).toUpperCase() + action.substring(1) + " " + entity.getTag("poi_type_tag");
}
p.setComment(comment);
points.add(p);
} while (query.moveToNext());
}