AbstractHafasMobileProvider: If parsed location is a 'mast', use 'main mast' (station) instead.

This commit is contained in:
Andreas Schildbach 2018-07-26 17:26:39 +02:00
parent 77f2255999
commit d42edbadf9

View file

@ -693,6 +693,9 @@ public abstract class AbstractHafasMobileProvider extends AbstractHafasProvider
final String[] placeAndName; final String[] placeAndName;
final Set<Product> products; final Set<Product> products;
if ("S".equals(type)) { if ("S".equals(type)) {
final int mMastLocX = loc.optInt("mMastLocX", -1);
if (mMastLocX != -1 && mMastLocX != locListIndex)
return parseLoc(locList, mMastLocX);
locationType = LocationType.STATION; locationType = LocationType.STATION;
id = normalizeStationId(loc.getString("extId")); id = normalizeStationId(loc.getString("extId"));
placeAndName = splitStationName(loc.getString("name")); placeAndName = splitStationName(loc.getString("name"));