Fix results
This commit is contained in:
parent
76f048a8a7
commit
fdaa903dbd
1 changed files with 4 additions and 9 deletions
|
@ -124,19 +124,14 @@ public class CurrentPositionHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Collections.sort(complete, GeocodingUtilities.DISTANCE_COMPARATOR);
|
Collections.sort(complete, GeocodingUtilities.DISTANCE_COMPARATOR);
|
||||||
for(final GeocodingResult r : complete) {
|
if(complete.size() > 0) {
|
||||||
if(r.building != null &&
|
final GeocodingResult rts = complete.get(0);
|
||||||
r.getDistance() > minBuildingDistance * GeocodingUtilities.THRESHOLD_MULTIPLIER_SKIP_BUILDINGS_AFTER) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
app.runInUIThread(new Runnable() {
|
app.runInUIThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
result.publish(r);
|
result.publish(rts);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static double getOrthogonalDistance(RouteDataObject r, Location loc){
|
private static double getOrthogonalDistance(RouteDataObject r, Location loc){
|
||||||
|
|
Loading…
Reference in a new issue