mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
Navitia: queryNearbyLocations() with distance of 0 now means "unlimited" (50km).
This commit is contained in:
parent
abad1694bc
commit
4f9fb0cab2
3 changed files with 19 additions and 1 deletions
|
@ -760,7 +760,7 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
public NearbyLocationsResult queryNearbyLocations(final EnumSet<LocationType> types, final Location location, final int maxDistance,
|
||||
public NearbyLocationsResult queryNearbyLocations(final EnumSet<LocationType> types, final Location location, int maxDistance,
|
||||
final int maxLocations) throws IOException
|
||||
{
|
||||
final ResultHeader resultHeader = new ResultHeader(network, SERVER_PRODUCT, SERVER_VERSION, 0, null);
|
||||
|
@ -799,6 +799,9 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider
|
|||
throw new IllegalArgumentException("Unhandled location type: " + location.type);
|
||||
}
|
||||
|
||||
if (maxDistance == 0)
|
||||
maxDistance = 50000;
|
||||
|
||||
final String queryUri = uri() + queryUriType + "places_nearby?type[]=stop_point" + "&distance=" + maxDistance + "&count=" + maxLocations
|
||||
+ "&depth=0";
|
||||
final CharSequence page = httpClient.get(queryUri);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue