public-transport-enabler icon indicating copy to clipboard operation
public-transport-enabler copied to clipboard

London Elizabeth Line

Open jayfan0 opened this issue 10 months ago • 3 comments

Hello,

London has had a new line opened since 2022 called the Elizabeth Line. Could this be added as a London line please? I see the other lines in the TLEM provider file

Thank you

jayfan0 avatar Apr 12 '24 23:04 jayfan0

If that's a subway line it should already be shown in the default subway colors. What you see in the TlemProvider.java is just the custom colors. Feel free to submit a PR for those.

schildbach avatar Apr 13 '24 08:04 schildbach

Its a strange hybrid line. Its a subway line under london but overground extending out to the outer parts of east and west london. The line colour is purple. See map here

I'm using an app called Transportr, and the journeys show some train ID numbers(?) rather than "Elizabeth Line". Other subway routes show the line name.

In fact all, if not most journeys in the UK are indicated by the train operator and destination rather than ID numbers which is what this app seems to show for journeys outside of London...

I wouldn't know where to begin tweaking these...

jayfan0 avatar Apr 14 '24 14:04 jayfan0

i've looked a bit into the JSON response and lizz reports herself as crossrail data-operator="XR"

so i think that this might work:

        //adding elizabeth line right here and i don't know how to test that. it just looks like it might make some sense.
        //i've looked at a JSON response from traveline and it says following:
            //product	"Elizabeth line"
            //productId	"13"
            //type	"9"
            //code	"18"
            //trainType	"OO"
        if ("1".equals(mot)) {
            if (trainType == "OO" && ("Elizabeth line".equals(product)))
                return new Line(id, network, Product.SUBURBAN_TRAIN, "Elizabeth Line");
        //here goes nothing with Lizz
        STYLES.put("SElizabeth Line", new Style(Style.parseColor("#6950a1"), Style.WHITE));

that's what i'd insert in the TlemProvider.java file

but honestly: i have no clue, it's just a wild guess and i'm by no means a programmer.

ghost avatar May 20 '24 22:05 ghost