mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 13:59:50 +00:00
Split name and place for Kiel, Lübeck & Schleswig-Holstein.
This commit is contained in:
parent
0517f99a4e
commit
dd1dc17085
1 changed files with 14 additions and 0 deletions
|
@ -141,6 +141,20 @@ public class ShProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final String[] PLACES = { "Kiel", "Lübeck" };
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String[] splitPlaceAndName(final String name)
|
||||||
|
{
|
||||||
|
for (final String place : PLACES)
|
||||||
|
{
|
||||||
|
if (name.startsWith(place + " ") || name.startsWith(place + "-"))
|
||||||
|
return new String[] { place, name.substring(place.length() + 1) };
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.splitPlaceAndName(name);
|
||||||
|
}
|
||||||
|
|
||||||
public NearbyStationsResult queryNearbyStations(final Location location, final int maxDistance, final int maxStations) throws IOException
|
public NearbyStationsResult queryNearbyStations(final Location location, final int maxDistance, final int maxStations) throws IOException
|
||||||
{
|
{
|
||||||
if (location.type == LocationType.STATION && location.hasId())
|
if (location.type == LocationType.STATION && location.hasId())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue