commit
d27af7fcd5
2 changed files with 8 additions and 2 deletions
|
@ -223,7 +223,7 @@ 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)
|
||||
k.startsWith(EditPoiData.REMOVE_TAG_PREFIX) || k.contains(EditPoiData.REMOVE_TAG_PREFIX))
|
||||
continue;
|
||||
ser.startTag(null, "tag"); //$NON-NLS-1$
|
||||
ser.attribute(null, "k", k); //$NON-NLS-1$
|
||||
|
|
|
@ -48,12 +48,12 @@ import net.osmand.plus.osmedit.OsmPoint;
|
|||
import net.osmand.plus.osmedit.dialogs.PoiSubTypeDialogFragment;
|
||||
import net.osmand.plus.quickaction.CreateEditActionDialog;
|
||||
import net.osmand.plus.quickaction.QuickAction;
|
||||
import net.osmand.plus.quickaction.QuickActionFactory;
|
||||
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,6 +539,12 @@ public class AddPOIAction extends QuickAction {
|
|||
}
|
||||
|
||||
private void setTagsIntoParams(Map<String, String> tags) {
|
||||
if (!tags.containsKey(POI_TYPE_TAG)) {
|
||||
Map<String, String> additionalTags = new HashMap<>(tags);
|
||||
tags.clear();
|
||||
tags.put(POI_TYPE_TAG, getTagsFromParams().get(POI_TYPE_TAG));
|
||||
tags.putAll(additionalTags);
|
||||
}
|
||||
getParams().put(KEY_TAG, new Gson().toJson(tags));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue