mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
AbstractNavitiaProvider: Pass network to getLineStyle().
This allows coverages with multiple distinct transport agencies (e.g. Australia) to meaninfully distinguish between different lines with similar names. For example, there is often buses which are labelled by numbers. "Bus 12" needs to be two different colours, based on which transport network it belongs to. In the case of Australia, it will use this to delegate to the lineStyles() method.
This commit is contained in:
parent
8a69715ba0
commit
af0bcdc17c
5 changed files with 13 additions and 13 deletions
|
@ -48,7 +48,7 @@ public class ParisProvider extends AbstractNavitiaProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Style getLineStyle(final Product product, final String code, final String color) {
|
||||
protected Style getLineStyle(final String network, final Product product, final String code, final String color) {
|
||||
switch (product) {
|
||||
case SUBURBAN_TRAIN: {
|
||||
// RER
|
||||
|
@ -81,7 +81,7 @@ public class ParisProvider extends AbstractNavitiaProvider {
|
|||
return new Style(Shape.ROUNDED, Style.parseColor(color), computeForegroundColor(color));
|
||||
}
|
||||
default:
|
||||
return super.getLineStyle(product, code, color);
|
||||
return super.getLineStyle(network, product, code, color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue