This commit is contained in:
Alexander Sytnyk 2017-07-27 10:29:12 +03:00
parent 728c53cc69
commit 11246e3d3d

View file

@ -727,9 +727,10 @@ public class MapInfoWidgetsFactory {
if (text == null) { if (text == null) {
text = ""; text = "";
} else { } else {
if(!Algorithms.isEmpty(text) && locationProvider.getLastKnownLocation() != null) { Location lastKnownLocation = locationProvider.getLastKnownLocation();
if(!Algorithms.isEmpty(text) && lastKnownLocation != null) {
double dist = double dist =
CurrentPositionHelper.getOrthogonalDistance(rt, locationProvider.getLastKnownLocation()); CurrentPositionHelper.getOrthogonalDistance(rt, lastKnownLocation);
if(dist < 50) { if(dist < 50) {
showMarker = true; showMarker = true;
} else { } else {