mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 00:50:31 +00:00
NVV: Add styles for Frankfurt.
This commit is contained in:
parent
d697d95943
commit
e9723c5aa7
1 changed files with 32 additions and 3 deletions
|
@ -17,12 +17,14 @@
|
||||||
|
|
||||||
package de.schildbach.pte;
|
package de.schildbach.pte;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
|
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
|
import de.schildbach.pte.dto.Style;
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provider implementation for the Nordhessischer Verkehrsverbund (North Hesse, Germany).
|
* Provider implementation for the Nordhessischer Verkehrsverbund (North Hesse, Germany).
|
||||||
*
|
*
|
||||||
|
@ -45,6 +47,7 @@ public class NvvProvider extends AbstractHafasClientInterfaceProvider {
|
||||||
setApiExt("NVV.6.0");
|
setApiExt("NVV.6.0");
|
||||||
setApiClient(apiClient);
|
setApiClient(apiClient);
|
||||||
setApiAuthorization(apiAuthorization);
|
setApiAuthorization(apiAuthorization);
|
||||||
|
setStyles(STYLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] PLACES = { "Frankfurt (Main)", "Offenbach (Main)", "Mainz", "Wiesbaden", "Marburg",
|
private static final String[] PLACES = { "Frankfurt (Main)", "Offenbach (Main)", "Mainz", "Wiesbaden", "Marburg",
|
||||||
|
@ -76,4 +79,30 @@ public class NvvProvider extends AbstractHafasClientInterfaceProvider {
|
||||||
return new String[] { m.group(1), m.group(2) };
|
return new String[] { m.group(1), m.group(2) };
|
||||||
return super.splitStationName(address);
|
return super.splitStationName(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final Map<String, Style> STYLES = new HashMap<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
STYLES.put("SS1", new Style(Style.parseColor("#009edd"), Style.WHITE));
|
||||||
|
STYLES.put("SS2", new Style(Style.parseColor("#ff2e17"), Style.WHITE));
|
||||||
|
STYLES.put("SS3", new Style(Style.parseColor("#00b098"), Style.WHITE));
|
||||||
|
STYLES.put("SS4", new Style(Style.parseColor("#ffc734"), Style.parseColor("#2c2e35"), Style.parseColor(
|
||||||
|
"#2c2e35")));
|
||||||
|
STYLES.put("SS5", new Style(Style.parseColor("#95542a"), Style.WHITE));
|
||||||
|
STYLES.put("SS6", new Style(Style.parseColor("#ff7322"), Style.WHITE));
|
||||||
|
STYLES.put("SS7", new Style(Style.parseColor("#214d36"), Style.WHITE));
|
||||||
|
STYLES.put("SS8", new Style(Style.parseColor("#88c946"), Style.WHITE));
|
||||||
|
STYLES.put("SS9", new Style(Style.parseColor("#872996"), Style.WHITE));
|
||||||
|
|
||||||
|
STYLES.put("UU1", new Style(Style.parseColor("#c52b1e"), Style.WHITE));
|
||||||
|
STYLES.put("UU2", new Style(Style.parseColor("#00ab4f"), Style.WHITE));
|
||||||
|
STYLES.put("UU3", new Style(Style.parseColor("#345aaf"), Style.WHITE));
|
||||||
|
STYLES.put("UU4", new Style(Style.parseColor("#fc5cac"), Style.WHITE));
|
||||||
|
STYLES.put("UU5", new Style(Style.parseColor("#0c7d3e"), Style.WHITE));
|
||||||
|
STYLES.put("UU6", new Style(Style.parseColor("#0082ca"), Style.WHITE));
|
||||||
|
STYLES.put("UU7", new Style(Style.parseColor("#f19e2d"), Style.WHITE));
|
||||||
|
STYLES.put("UU8", new Style(Style.parseColor("#ca7fbe"), Style.WHITE));
|
||||||
|
STYLES.put("UU9", new Style(Style.parseColor("#f4d039"), Style.parseColor("#2c2e35"), Style.parseColor(
|
||||||
|
"#2c2e35")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue