Floor

public struct Floor: Decodable

A floor inside a building.

  • Floor level string value, e.g. -1, , 00, etc. Use .level instead for a more sensible interpretation.

    Declaration

    Swift

    public let rawLevel: String
  • Maximum X coordinate.

    Declaration

    Swift

    public let maxX: Double
  • Maximum Y coordinate.

    Declaration

    Swift

    public let maxY: Double
  • All rooms on this floor.

    Declaration

    Swift

    public let rooms: [Room]
  • Floor level

    Declaration

    Swift

    public var level: Int?
  • Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder
  • A single room.

    See more

    Declaration

    Swift

    public struct Room: Decodable
  • Fetch the floorplan layout for a given building.

    Declaration

    Swift

    public static func fetch(forBuilding buildingID: String,
                                 session: URLSession = .shared,
                                 completion: @escaping (Result<[Floor]>) -> Void)

    Parameters

    buildingID

    building abbreviation, e.g. APB

    session

    session to use, defaults to .shared

    completion

    handler