diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java index 4cac70a352..e2d0abe87d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java @@ -132,13 +132,14 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea if (location == null) { location = settings.getLastKnownMapLocation(); } + locationUpdate(location); } @Override public void locationUpdate(LatLon l) { location = l; if(adapter != null){ - adapter.notifyDataSetInvalidated(); + adapter.updateLocation(l); } } @@ -244,6 +245,12 @@ public class SearchAddressOnlineFragment extends SherlockFragment implements Sea } class PlacesAdapter extends ArrayAdapter { + private LatLon location; + + public void updateLocation(LatLon l) { + location = l; + notifyDataSetChanged(); + } public PlacesAdapter(List places) { super(getActivity(), R.layout.search_address_online_list_item, places);