-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Currently, in this library, a station has the following shape:
{
label: 'Central',
}To indicate that a line serves a station, the following is included in the line's nodes array:
{
name: 'CEN',
labelPos: 'W',
coords: [0, 0], // Mandatory property.
}It looks like each station gets its coordinates on the map from a line's node. If a station is included in the stations object, but not included on any of the lines, the library throws an error.
Since a station's coordinates are immutable, and since each station marker can only have one label, I think the coords and labelPos properties should be assigned to the station object instead.
{
label: 'Central',
labelPos: 'W',
coords: [0, 0],
}When a line serves a station, the node showing this can have just the name property.
{
name: 'CEN',
}This node can then get its coords property from the matching station from the stations object.
When a line turns a corner, it should still use a single coords property, as before.