Don't export deleted tags
This commit is contained in:
parent
35caa22e40
commit
53167af9e1
1 changed files with 7 additions and 2 deletions
|
@ -793,7 +793,7 @@ public class OsmEditsFragment extends OsmAndListFragment implements SendPoiDialo
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (String tag : point.getEntity().getTagKeySet()) {
|
for (String tag : point.getEntity().getTagKeySet()) {
|
||||||
String val = point.getEntity().getTag(tag);
|
String val = point.getEntity().getTag(tag);
|
||||||
if (val == null || val.length() == 0 || tag.length() == 0 || "poi_type_tag".equals(tag)) {
|
if (isNotValid(tag, val)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sb.append(tag).append(" : ");
|
sb.append(tag).append(" : ");
|
||||||
|
@ -802,6 +802,11 @@ public class OsmEditsFragment extends OsmAndListFragment implements SendPoiDialo
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isNotValid(String tag, String val) {
|
||||||
|
return val == null || val.length() == 0 || tag.length() == 0
|
||||||
|
|| tag.startsWith(EditPoiData.REMOVE_TAG_PREFIX) || tag.equals("poi_type_tag");
|
||||||
|
}
|
||||||
|
|
||||||
private void writeContent(XmlSerializer sz, OsmPoint[] points, OsmPoint.Action a) throws IllegalArgumentException, IllegalStateException, IOException {
|
private void writeContent(XmlSerializer sz, OsmPoint[] points, OsmPoint.Action a) throws IllegalArgumentException, IllegalStateException, IOException {
|
||||||
for (OsmPoint point : points) {
|
for (OsmPoint point : points) {
|
||||||
if (point.getGroup() == Group.POI) {
|
if (point.getGroup() == Group.POI) {
|
||||||
|
@ -814,7 +819,7 @@ public class OsmEditsFragment extends OsmAndListFragment implements SendPoiDialo
|
||||||
sz.attribute("", "version", "1");
|
sz.attribute("", "version", "1");
|
||||||
for (String tag : p.getEntity().getTagKeySet()) {
|
for (String tag : p.getEntity().getTagKeySet()) {
|
||||||
String val = p.getEntity().getTag(tag);
|
String val = p.getEntity().getTag(tag);
|
||||||
if (val == null || val.length() == 0 || tag.length() == 0 || "poi_type_tag".equals(tag)) {
|
if (isNotValid(tag, val)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sz.startTag("", "tag");
|
sz.startTag("", "tag");
|
||||||
|
|
Loading…
Reference in a new issue