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.
Currently, in this library, a station has the following shape:
To indicate that a line serves a station, the following is included in the line's
nodes
array: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
andlabelPos
properties should be assigned to the station object instead.When a line serves a station, the node showing this can have just the
name
property.This node can then get its
coords
property from the matching station from thestations
object.When a line turns a corner, it should still use a single
coords
property, as before.