This commit is contained in:
Victor Shcherb 2013-04-01 19:04:18 +02:00
parent 7e529baf9a
commit 2e8e928b80

View file

@ -147,10 +147,17 @@ public class GeoIntentActivity extends OsmandListActivity {
} else {
distanceLabel.setText(""); //$NON-NLS-1$
}
label.setText(model.toString());
label.setText(getString(model));
return row;
}
}
private String getString(MapObject o){
if(o instanceof Amenity) {
return OsmAndFormatter.getPoiSimpleFormat((Amenity) o, getMyApplication(), false);
}
return getString(R.string.address) + " : " + o.toString();
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
@ -158,7 +165,7 @@ public class GeoIntentActivity extends OsmandListActivity {
MapObject item = ((MapObjectAdapter) getListAdapter()).getItem(position);
OsmandSettings settings = getMyApplication().getSettings();
settings.setMapLocationToShow(item.getLocation().getLatitude(), item.getLocation().getLongitude(),
settings.getLastKnownMapZoom(), getString(R.string.address) + " : " + item.toString()); //$NON-NLS-1$
settings.getLastKnownMapZoom(), getString(item)); //$NON-NLS-1$
MapActivity.launchMapActivityMoveToTop(this);
}