mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-21 01:39:51 +00:00
Rename .queryNearbyStations() to .queryNearbyLocations() and make it find POIs too.
This commit is contained in:
parent
25c2eb6176
commit
8df79805d0
84 changed files with 565 additions and 665 deletions
|
@ -23,6 +23,7 @@ import java.util.Calendar;
|
|||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -37,7 +38,7 @@ import de.schildbach.pte.dto.Departure;
|
|||
import de.schildbach.pte.dto.Line;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.NearbyLocationsResult;
|
||||
import de.schildbach.pte.dto.Position;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -57,6 +58,8 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
public static final NetworkId NETWORK_ID = NetworkId.INVG;
|
||||
private static final String API_BASE = "http://fpa.invg.de/bin/";
|
||||
|
||||
// http://invg.hafas.de/bin/
|
||||
|
||||
private static final long PARSER_DAY_ROLLOVER_THRESHOLD_MS = 12 * 60 * 60 * 1000;
|
||||
|
||||
public InvgProvider()
|
||||
|
@ -125,7 +128,8 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
public NearbyStationsResult queryNearbyStations(final Location location, final int maxDistance, final int maxStations) throws IOException
|
||||
public NearbyLocationsResult queryNearbyLocations(final EnumSet<LocationType> types, final Location location, final int maxDistance,
|
||||
final int maxStations) throws IOException
|
||||
{
|
||||
if (location.type == LocationType.STATION && location.hasId())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue