[Quick search] added topbar for latlon objects

This commit is contained in:
Alexey Kulish 2016-07-28 22:11:00 +03:00
parent 3ed09c9241
commit 5ebbc9db89
2 changed files with 3 additions and 1 deletions

View file

@ -1360,6 +1360,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
public void showQuickSearch() { public void showQuickSearch() {
QuickSearchDialogFragment fragment = getQuickSearchDialogFragment(); QuickSearchDialogFragment fragment = getQuickSearchDialogFragment();
mapContextMenu.hide();
if (fragment != null) { if (fragment != null) {
fragment.show(); fragment.show();
refreshMap(); refreshMap();

View file

@ -144,7 +144,6 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment {
private void showOnMap(SearchResult searchResult) { private void showOnMap(SearchResult searchResult) {
if (searchResult.location != null) { if (searchResult.location != null) {
dialogFragment.dismiss();
OsmandApplication app = getMyApplication(); OsmandApplication app = getMyApplication();
PointDescription pointDescription = null; PointDescription pointDescription = null;
Object object = searchResult.object; Object object = searchResult.object;
@ -188,11 +187,13 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment {
pointDescription = wpt.getPointDescription(getMyApplication()); pointDescription = wpt.getPointDescription(getMyApplication());
break; break;
} }
getMapActivity().setQuickSearchTopbarActive(true);
getMyApplication().getSettings().setMapLocationToShow( getMyApplication().getSettings().setMapLocationToShow(
searchResult.location.getLatitude(), searchResult.location.getLongitude(), searchResult.location.getLatitude(), searchResult.location.getLongitude(),
searchResult.preferredZoom, pointDescription, true, object); searchResult.preferredZoom, pointDescription, true, object);
MapActivity.launchMapActivityMoveToTop(getActivity()); MapActivity.launchMapActivityMoveToTop(getActivity());
dialogFragment.hide();
} }
} }