mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 21:58:49 +00:00
more parameters for connection
This commit is contained in:
parent
aced1e9a82
commit
fd65b0333e
1 changed files with 8 additions and 4 deletions
|
@ -60,11 +60,15 @@ public class LocationController
|
||||||
|
|
||||||
@RequestMapping(value = "/connection", method = RequestMethod.GET)
|
@RequestMapping(value = "/connection", method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public QueryConnectionsResult connection(@RequestParam("from") final String from, @RequestParam("fromId") final int fromId,
|
public QueryConnectionsResult connection(@RequestParam(value = "fromType", required = false, defaultValue = "ANY") final LocationType fromType,
|
||||||
@RequestParam("to") final String to, @RequestParam("toId") final int toId) throws IOException
|
@RequestParam(value = "from", required = false) final String from,
|
||||||
|
@RequestParam(value = "fromId", required = false, defaultValue = "0") final int fromId,
|
||||||
|
@RequestParam(value = "toType", required = false, defaultValue = "ANY") final LocationType toType,
|
||||||
|
@RequestParam(value = "to", required = false) final String to,
|
||||||
|
@RequestParam(value = "toId", required = false, defaultValue = "0") final int toId) throws IOException
|
||||||
{
|
{
|
||||||
final Location fromLocation = new Location(LocationType.ANY, fromId, null, from);
|
final Location fromLocation = new Location(fromType, fromId, null, from);
|
||||||
final Location toLocation = new Location(LocationType.ANY, toId, null, to);
|
final Location toLocation = new Location(toType, toId, null, to);
|
||||||
final String products = "IRSUTBFC";
|
final String products = "IRSUTBFC";
|
||||||
return provider.queryConnections(fromLocation, null, toLocation, new Date(), true, products, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
return provider.queryConnections(fromLocation, null, toLocation, new Date(), true, products, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue