Split name and place for Kiel, Lübeck & Schleswig-Holstein.

This commit is contained in:
Andreas Schildbach 2014-07-30 00:27:57 +02:00
parent 0517f99a4e
commit dd1dc17085

View file

@ -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
{
if (location.type == LocationType.STATION && location.hasId())