From 652ff15241fdfa659446b3845be88d659e94aa8d Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sat, 6 Oct 2018 11:39:42 +0200 Subject: [PATCH] AbstractNavitiaProvider: When querying for nearby locations always use coordinates if provided by caller. --- enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java b/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java index 49fe37b1..77dc4b8d 100644 --- a/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java +++ b/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java @@ -693,10 +693,7 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider { // Build url depending of location type. final HttpUrl.Builder url = url(); - if (location.type == LocationType.COORD || location.type == LocationType.ADDRESS - || location.type == LocationType.ANY) { - if (!location.hasLocation()) - throw new IllegalArgumentException(); + if (location.hasLocation()) { final double lon = location.lon / 1E6; final double lat = location.lat / 1E6; url.addPathSegment("coords").addPathSegment(lon + ";" + lat);