Fix EditPOI context menu
This commit is contained in:
parent
938c3caae5
commit
4eeb563d0a
1 changed files with 1 additions and 9 deletions
|
@ -3,10 +3,7 @@ package net.osmand.plus.osmedit;
|
|||
import android.view.View;
|
||||
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.osm.MapPoiTypes;
|
||||
import net.osmand.osm.PoiType;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||
|
@ -42,7 +39,7 @@ public class EditPOIMenuBuilder extends MenuBuilder {
|
|||
for (Map.Entry<String, String> e : point.getEntity().getTags().entrySet()) {
|
||||
if (EditPoiData.POI_TYPE_TAG.equals(e.getKey())) {
|
||||
String poiTranslation = e.getValue();
|
||||
Map<String, PoiType> poiTypeMap = MapPoiTypes.getDefault().getAllTranslatedNames(false);
|
||||
Map<String, PoiType> poiTypeMap = app.getPoiTypes().getAllTranslatedNames(false);
|
||||
PoiType poiType = poiTypeMap.get(poiTranslation.toLowerCase());
|
||||
int resId = 0;
|
||||
if (poiType != null) {
|
||||
|
@ -74,13 +71,8 @@ public class EditPOIMenuBuilder extends MenuBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
OsmandSettings st = ((OsmandApplication) mapActivity.getApplicationContext()).getSettings();
|
||||
buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationName(app,
|
||||
osmPoint.getLatitude(), osmPoint.getLongitude(), true)
|
||||
.replaceAll("\n", " "), 0, false, null, false, 0, false, null);
|
||||
//if (st.COORDINATES_FORMAT.get() != PointDescription.OLC_FORMAT)
|
||||
// buildRow(view, R.drawable.ic_action_get_my_location, PointDescription.getLocationOlcName(
|
||||
// osmPoint.getLatitude(), osmPoint.getLongitude())
|
||||
// .replaceAll("\n", " "), 0, false, null, false, 0, false, null);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue