PlaceInfo

protocol PlaceInfo

Information common to all place types

  • Coordinate for plotting on map

    Declaration

    Swift

    var placeCoordinate: CLLocationCoordinate2D { get }
  • UN country containing place

    Declaration

    Swift

    var placeCountry: String { get }
  • placeCountryId Default implementation

    Country’s MTP ID

    Default Implementation

    Default non-countries to 0

    Declaration

    Swift

    var placeCountryId: Int { get }
  • Place’s MTP ID

    Declaration

    Swift

    var placeId: Int { get }
  • UUID of main image to display for place

    Declaration

    Swift

    var placeImageUrl: URL? { get }
  • placeIsCountry Default implementation

    Whether the place is a country

    Default Implementation

    Only countries are countries

    Declaration

    Swift

    var placeIsCountry: Bool { get }
  • MTP location containing place

    Declaration

    Swift

    var placeLocation: Location? { get }
  • placeParent Default implementation

    For WHS, whether place has a parent place

    Default Implementation

    Only WHS may have parents

    Declaration

    Swift

    var placeParent: PlaceInfo? { get }
  • Region containing the country

    Declaration

    Swift

    var placeRegion: String { get }
  • placeSubtitle Default implementation

    Subtitle to display to user

    Default Implementation

    Subtitle is usually the MTP location

    Declaration

    Swift

    var placeSubtitle: String { get }
  • Title to display to user

    Declaration

    Swift

    var placeTitle: String { get }
  • Number of MTP visitors

    Declaration

    Swift

    var placeVisitors: Int { get }
  • for non-MTP locations, page to load in More Info screen

    Declaration

    Swift

    var placeWebUrl: URL? { get }