mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-21 01:39:51 +00:00
resolve addresses without geolocation
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@537 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
acdec06e61
commit
5ce40b8a07
2 changed files with 23 additions and 3 deletions
|
@ -198,7 +198,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
public QueryConnectionsResult queryConnections(Location from, Location via, Location to, final Date date, final boolean dep,
|
||||
final String products, final WalkSpeed walkSpeed) throws IOException
|
||||
{
|
||||
if (from.type == LocationType.ANY)
|
||||
if (from.type == LocationType.ANY || (from.type == LocationType.ADDRESS && !from.hasLocation()))
|
||||
{
|
||||
final List<Location> autocompletes = autocompleteStations(from.name);
|
||||
if (autocompletes.isEmpty())
|
||||
|
@ -208,7 +208,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
from = autocompletes.get(0);
|
||||
}
|
||||
|
||||
if (via != null && via.type == LocationType.ANY)
|
||||
if (via != null && (via.type == LocationType.ANY || (via.type == LocationType.ADDRESS && !via.hasLocation())))
|
||||
{
|
||||
final List<Location> autocompletes = autocompleteStations(via.name);
|
||||
if (autocompletes.isEmpty())
|
||||
|
@ -218,7 +218,7 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
via = autocompletes.get(0);
|
||||
}
|
||||
|
||||
if (to.type == LocationType.ANY)
|
||||
if (to.type == LocationType.ANY || (to.type == LocationType.ADDRESS && !to.hasLocation()))
|
||||
{
|
||||
final List<Location> autocompletes = autocompleteStations(to.name);
|
||||
if (autocompletes.isEmpty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue