RailwayStation

public struct RailwayStation: Codable, CustomStringConvertible

Basic information of a railway station provided by iRail

  • The name of the station in the original language

    Declaration

    Swift

    public let originalName: String
  • 2D coordinate indicating the geographical location of the railway station

    Declaration

    Swift

    public let location: CLLocationCoordinate2D
  • id

    A unique url for the railway station defined by the iRail project.

    Declaration

    Swift

    public let id: iRailID
  • Translate the name in a specified locale

    Declaration

    Swift

    public func name(in userLocale: Locale = Locale.autoupdatingCurrent) -> String

    Parameters

    userLocale

    Optional object containing the desired language. If no locale is provided the user’s locale will be used.

    Return Value

    The name of the station in the specified locale’s language

  • The name of the station in the user locale’s language

    Declaration

    Swift

    public var description: String