diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java index e69ce85bde..b682ceed0d 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java @@ -222,8 +222,14 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil { for (String k : n.getTagKeySet()) { String val = n.getTag(k); - if (val.length() == 0 || k.length() == 0 || EditPoiData.POI_TYPE_TAG.equals(k) || - k.startsWith(EditPoiData.REMOVE_TAG_PREFIX) || n.getTag(EditPoiData.REMOVE_TAG_PREFIX + k) != null) + boolean valLengthZero = val.length() == 0; + boolean kLengthZero = k.length() == 0; + boolean poiTypeTag = EditPoiData.POI_TYPE_TAG.equals(k); + boolean kStartsWithRemoveTagPrefix = k.startsWith(EditPoiData.REMOVE_TAG_PREFIX); + String removeTagPrefixK = EditPoiData.REMOVE_TAG_PREFIX + k; +// boolean tagWithRemoveTagPrefix = n.getTag(EditPoiData.REMOVE_TAG_PREFIX + k) != null; + boolean tagWithRemoveTagPrefix = k.contains(EditPoiData.REMOVE_TAG_PREFIX); + if (valLengthZero || kLengthZero || poiTypeTag || kStartsWithRemoveTagPrefix || tagWithRemoveTagPrefix) continue; ser.startTag(null, "tag"); //$NON-NLS-1$ ser.attribute(null, "k", k); //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java index a892b7d987..3ad79ad9eb 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/AddPOIAction.java @@ -54,6 +54,7 @@ import net.osmand.util.Algorithms; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Comparator; +import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; @@ -539,7 +540,9 @@ public class AddPOIAction extends QuickAction { } private void setTagsIntoParams(Map tags) { + HashMap padrams = getParams(); getParams().put(KEY_TAG, new Gson().toJson(tags)); + padrams = getParams(); } private void putTagIntoParams(String tag, String value) {