mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 17:10:30 +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
|
@ -46,6 +46,14 @@ public class SbbProviderLiveTest
|
|||
list(autocompletes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autoCompleteAddress() throws Exception
|
||||
{
|
||||
final List<Location> autocompletes = provider.autocompleteStations("Dorfstrasse 10, Dällikon, Schweiz");
|
||||
|
||||
list(autocompletes);
|
||||
}
|
||||
|
||||
private void list(final List<Location> autocompletes)
|
||||
{
|
||||
System.out.print(autocompletes.size() + " ");
|
||||
|
@ -99,4 +107,16 @@ public class SbbProviderLiveTest
|
|||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void connectionFromAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = provider.queryConnections(new Location(LocationType.ADDRESS, 0, null,
|
||||
"Dorfstrasse 10, Dällikon, Schweiz"), null, new Location(LocationType.STATION, 8500010, null, "Basel"), new Date(), true,
|
||||
ALL_PRODUCTS, WalkSpeed.NORMAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.context);
|
||||
System.out.println(moreResult);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue