Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
34ef3de704
1 changed files with 4 additions and 2 deletions
|
@ -162,6 +162,7 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
|
||||||
|
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
|
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
|
||||||
|
LatLon last = settings.getLastKnownMapLocation();
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
|
double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
|
||||||
double lon = intent.getDoubleExtra(SEARCH_LON, 0);
|
double lon = intent.getDoubleExtra(SEARCH_LON, 0);
|
||||||
|
@ -169,7 +170,8 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
|
||||||
LatLon l = new LatLon(lat, lon);
|
LatLon l = new LatLon(lat, lon);
|
||||||
if(!Algorithms.objectEquals(reqSearchPoint, l)){
|
if(!Algorithms.objectEquals(reqSearchPoint, l)){
|
||||||
reqSearchPoint = l;
|
reqSearchPoint = l;
|
||||||
if (Algorithms.objectEquals(reqSearchPoint, settings.getLastKnownMapLocation())) {
|
//if (Algorithms.objectEquals(reqSearchPoint, settings.getLastKnownMapLocation())) {
|
||||||
|
if ((Math.abs(lat - last.getLatitude()) < 0.00001) && (Math.abs(lon - last.getLongitude()) < 0.00001)) {
|
||||||
updateSearchPoint(reqSearchPoint, getString(R.string.select_search_position) + " " + getString(R.string.search_position_map_view), false);
|
updateSearchPoint(reqSearchPoint, getString(R.string.select_search_position) + " " + getString(R.string.search_position_map_view), false);
|
||||||
} else {
|
} else {
|
||||||
updateSearchPoint(reqSearchPoint, getString(R.string.select_search_position) + " ", true);
|
updateSearchPoint(reqSearchPoint, getString(R.string.select_search_position) + " ", true);
|
||||||
|
@ -178,7 +180,7 @@ public class SearchActivity extends SherlockFragmentActivity implements OsmAndLo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(searchPoint == null){
|
if(searchPoint == null){
|
||||||
LatLon last = settings.getLastKnownMapLocation();
|
//LatLon last = settings.getLastKnownMapLocation();
|
||||||
if(!Algorithms.objectEquals(reqSearchPoint, last)){
|
if(!Algorithms.objectEquals(reqSearchPoint, last)){
|
||||||
reqSearchPoint = last;
|
reqSearchPoint = last;
|
||||||
updateSearchPoint(last, getString(R.string.select_search_position) + " " + getString(R.string.search_position_map_view), false);
|
updateSearchPoint(last, getString(R.string.select_search_position) + " " + getString(R.string.search_position_map_view), false);
|
||||||
|
|
Loading…
Reference in a new issue