Fix "Changing POI category on an existing object has no impact"
This commit is contained in:
parent
2377a089ab
commit
fe4b6ff59e
1 changed files with 8 additions and 1 deletions
|
@ -45,6 +45,7 @@ import java.net.MalformedURLException;
|
|||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -524,7 +525,13 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil {
|
|||
entity.removeTag(poiType.getEditOsmTag());
|
||||
entity.putTagNoLC(EditPoiData.POI_TYPE_TAG, poiType.getTranslation());
|
||||
} else {
|
||||
// later we could try to determine tags
|
||||
List<PoiType> poiTypes = type.getPoiTypes();
|
||||
for (PoiType pt : poiTypes) {
|
||||
if (pt.getEditOsmValue().equals(entity.getTag(pt.getEditOsmTag()))) {
|
||||
entity.removeTag(pt.getEditOsmTag());
|
||||
entity.putTagNoLC(EditPoiData.POI_TYPE_TAG, pt.getTranslation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
|
|
Loading…
Reference in a new issue