mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
nearby stations by coordinate for Switzerland
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@622 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
13126655c1
commit
834ef0c03f
2 changed files with 37 additions and 17 deletions
|
@ -75,7 +75,19 @@ public class SbbProvider extends AbstractHafasProvider
|
|||
{
|
||||
final StringBuilder uri = new StringBuilder(API_BASE);
|
||||
|
||||
if (location.type == LocationType.STATION && location.hasId())
|
||||
if (location.hasLocation())
|
||||
{
|
||||
uri.append("query.exe/dny");
|
||||
uri.append("?performLocating=2&tpl=stop2json");
|
||||
uri.append("&look_maxno=").append(maxStations != 0 ? maxStations : 200);
|
||||
uri.append("&look_maxdist=").append(maxDistance != 0 ? maxDistance : 5000);
|
||||
uri.append("&look_stopclass=").append(allProductsInt());
|
||||
uri.append("&look_x=").append(location.lon);
|
||||
uri.append("&look_y=").append(location.lat);
|
||||
|
||||
return jsonNearbyStations(uri.toString());
|
||||
}
|
||||
else if (location.type == LocationType.STATION && location.hasId())
|
||||
{
|
||||
uri.append("bhftafel.exe/dn?near=Anzeigen");
|
||||
uri.append("&distance=").append(maxDistance != 0 ? maxDistance / 1000 : 50);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue