mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-17 17:09:51 +00:00
line styles of Freiburg
This commit is contained in:
parent
3598373752
commit
681c38be7a
1 changed files with 28 additions and 0 deletions
|
@ -18,10 +18,14 @@
|
||||||
package de.schildbach.pte;
|
package de.schildbach.pte;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import de.schildbach.pte.dto.Location;
|
import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
|
import de.schildbach.pte.dto.Style;
|
||||||
|
import de.schildbach.pte.dto.Style.Shape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -55,4 +59,28 @@ public class VagfrProvider extends AbstractEfaProvider
|
||||||
{
|
{
|
||||||
return xmlStopfinderRequest(new Location(LocationType.STATION, 0, null, constraint.toString()));
|
return xmlStopfinderRequest(new Location(LocationType.STATION, 0, null, constraint.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final Map<String, Style> LINES = new HashMap<String, Style>();
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
// Tram
|
||||||
|
LINES.put("T1", new Style(Shape.RECT, Style.parseColor("#ed1c24"), Style.WHITE));
|
||||||
|
LINES.put("T2", new Style(Shape.RECT, Style.parseColor("#33b540"), Style.WHITE));
|
||||||
|
LINES.put("T3", new Style(Shape.RECT, Style.parseColor("#f79210"), Style.WHITE));
|
||||||
|
LINES.put("T5", new Style(Shape.RECT, Style.parseColor("#0994ce"), Style.WHITE));
|
||||||
|
|
||||||
|
// Nachtbus
|
||||||
|
LINES.put("BN42 Jupiter", new Style(Style.parseColor("#33b540"), Style.WHITE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Style lineStyle(final String line)
|
||||||
|
{
|
||||||
|
final Style style = LINES.get(line);
|
||||||
|
if (style != null)
|
||||||
|
return style;
|
||||||
|
else
|
||||||
|
return super.lineStyle(line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue