mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
AbstractNavitiaProvider: When querying for nearby locations always use coordinates if provided by caller.
This commit is contained in:
parent
967f9b8320
commit
652ff15241
1 changed files with 1 additions and 4 deletions
|
@ -693,10 +693,7 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
|
||||||
|
|
||||||
// Build url depending of location type.
|
// Build url depending of location type.
|
||||||
final HttpUrl.Builder url = url();
|
final HttpUrl.Builder url = url();
|
||||||
if (location.type == LocationType.COORD || location.type == LocationType.ADDRESS
|
if (location.hasLocation()) {
|
||||||
|| location.type == LocationType.ANY) {
|
|
||||||
if (!location.hasLocation())
|
|
||||||
throw new IllegalArgumentException();
|
|
||||||
final double lon = location.lon / 1E6;
|
final double lon = location.lon / 1E6;
|
||||||
final double lat = location.lat / 1E6;
|
final double lat = location.lat / 1E6;
|
||||||
url.addPathSegment("coords").addPathSegment(lon + ";" + lat);
|
url.addPathSegment("coords").addPathSegment(lon + ";" + lat);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue