GeoPlace

public struct GeoPlace : Hashable

GeoPlace struct represents a location object: such as a country, a city, a point of interest (POI) etc. It can be used for PersonalPlace creation, in order to provide search on custom places.

  • The localized title for the resource. Note: This String can be empty when no data is available.

    Declaration

    Swift

    public var title: String
  • Allows the client to set the id in their own system. The list of supplier references to this place. The references are provided by external suppliers and are only available to users with valid contracts with said suppliers. If the user has no such contracts, the list is empty.

    Declaration

    Swift

    public var externalIDs: [ExternalID]
  • Specifies place type.

    Declaration

    Swift

    public var type: PlaceType
  • List of corresponding categories Note: This list can be empty when no data is available.

    Declaration

    Swift

    public var categories: [PlaceCategory]
  • Address of the place Note: Address can have default value when no data is available.

    Declaration

    Swift

    public var address: Address
  • Geographical details Note: Can be nil when retrieved from a suggestion’s place property.

    Declaration

    Swift

    public var location: LocationDetails?
  • Business details Note: BusinessDetails can have default value when no data is available.

    Declaration

    Swift

    public var business: BusinessDetails
  • web

    Contains info and direct web links to corresponding items. Note: WebDetails can have default value when no data is available.

    Declaration

    Swift

    public var web: WebDetails
  • Creates a new instance.

    Declaration

    Swift

    public init(title: String = "", externalIDs: [ExternalID] = [], type: PlaceType = PlaceType.unknown, categories: [PlaceCategory] = [], address: Address = Address(), location: LocationDetails? = nil, business: BusinessDetails = BusinessDetails(), web: WebDetails = WebDetails())
  • Creates a new instance of this class. All other properties will keep their default value and all properties containing lists will contain empty lists.

    Declaration

    Swift

    public static func makeMyPlace(title: String, coordinates: GeoCoordinates) -> GeoPlace

    Parameters

    title

    The title.

    coordinates

    The coordinates.

    Return Value

    An instance of GeoPlace.

  • Allow the client to access GeoPlace id.

    Declaration

    Swift

    public func getID() -> String

    Return Value

    The place id.

  • Allow the client to access info about is it my place or not.

    Declaration

    Swift

    public func isMyPlace() -> Bool

    Return Value

    True if it is my place, false otherwise.