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:
Peter Serwylo 2017-05-27 08:17:21 +10:00 committed by Andreas Schildbach
parent 8a69715ba0
commit af0bcdc17c
5 changed files with 13 additions and 13 deletions

View file

@ -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);
}
}