AbstractHafasMobileProvider: If address is passed to jsonTripSearch() without id, also use coordinate to identify the address.

This commit is contained in:
Andreas Schildbach 2017-02-16 17:03:52 +01:00
parent 43abca08f5
commit 188dbf397d

View file

@ -353,6 +353,12 @@ public abstract class AbstractHafasMobileProvider extends AbstractHafasProvider
if (!locations.isEmpty())
return locations.get(0);
}
if (location.hasLocation()) {
final List<Location> locations = jsonLocGeoPos(EnumSet.allOf(LocationType.class), location.lat,
location.lon).locations;
if (!locations.isEmpty())
return locations.get(0);
}
return null;
}