add poi fixes

This commit is contained in:
Korusn Oleksandr 2017-01-06 16:33:20 +02:00
parent 7c522c23b2
commit e66b5bb549
2 changed files with 6 additions and 2 deletions

View file

@ -1523,9 +1523,11 @@ public class QuickActionFactory {
if (plugin == null) return;
Node node = new Node(latLon.getLatitude(), latLon.getLongitude(), -1);
node.replaceTags(getTagsFromParams());
EditPoiData editPoiData = new EditPoiData(node, activity.getMyApplication());
if (Boolean.valueOf(getParams().get(KEY_DIALOG))) {
Node newNode = editPoiData.getEntity();
EditPoiDialogFragment editPoiDialogFragment =
EditPoiDialogFragment.createInstance(node, true, getTagsFromParams());
EditPoiDialogFragment.createInstance(newNode, true, getTagsFromParams());
editPoiDialogFragment.show(activity.getSupportFragmentManager(),
EditPoiDialogFragment.TAG);
} else {
@ -1536,7 +1538,6 @@ public class QuickActionFactory {
} else {
mOpenstreetmapUtil = plugin.getPoiModificationRemoteUtil();
}
EditPoiData editPoiData = new EditPoiData(node, activity.getMyApplication());
final boolean offlineEdit = mOpenstreetmapUtil instanceof OpenstreetmapLocalUtil;
Node newNode = new Node(node.getLatitude(), node.getLongitude(), node.getId());
@ -1797,6 +1798,7 @@ public class QuickActionFactory {
private PoiCategory getCategory(Map<String, PoiType> allTranslatedNames) {
String tp = getTagsFromParams().get(POI_TYPE_TAG);
if (tp == null) return null;
PoiType pt = allTranslatedNames.get(tp.toLowerCase());
if (pt != null) {
return pt.getCategory();

View file

@ -101,6 +101,8 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
return true;
}
});
}
public void refreshLayer() {