Place

public class Place
extension Place: NativeBase
extension Place: Hashable

Represents a location object, such as a country, a city, a point of interest (POI) etc.

  • The localized title for the resource.

    Declaration

    Swift

    public var title: String { get }
  • id

    The unique id of this resource. It can be used to query further information. When returned from OfflineSearchEngine, id is valid only for Place objects whose place_type is POI. Otherwise, it is empty.

    Declaration

    Swift

    public var id: String { get }
  • The place type.

    Declaration

    Swift

    public var placeType: PlaceType { get }
  • The area type. It is available only when the Place.placeType is PlaceType.area.

    Declaration

    Swift

    public var areaType: AreaType? { get }
  • The address of the place.

    Note that while OfflineSearchEngine.suggest and OfflineSearchEngine.suggestByText set all available details, SearchEngine.suggest and SearchEngine.suggestByText set only Address.addressText. Complete address details can be obtained by searching with PlaceIdQuery.

    Declaration

    Swift

    public var address: Address { get }
  • The place’s detailed information.

    Declaration

    Swift

    public var details: Details { get }
  • The geographic coordinates of the place. Can be nil when retrieved from a suggestion’s place property.

    Declaration

    Swift

    public var geoCoordinates: GeoCoordinates? { get }
  • A property that says whether the coordinates of the house number were interpolated or not. This property is valid only for house number results retrieved using online search. When false, it means Place.geoCoordinates point to an accurate position of the house. Otherwise coordinates are slightly less accurate, but are based on a highly optimized interpolation algorithm.

    Declaration

    Swift

    public var isCoordinatesInterpolated: Bool { get }
  • The access points to the place, such as the points on a road or in a parking lot. A place can have multiple access points. For example, a large warehouse can have multiple entrances, while the center of the warehouse may not be directly reachable. Note that access points are meant to be reachable by vehicles. For routes it is recommended to navigate to one of the available access points (if any), whereas the sideOfStreetHint should be set to the geographic coordinates of the place. The list is empty when no access points are known or when the place is directly reachable. A place can have multiple access points. For example, a large warehouse can have multiple entrances, while the center of the warehouse may not be directly reachable. Note that access points are meant to be reachable by vehicles. For routes it is recommended to navigate to one of the available access points (if any), whereas the sideOfStreetHint should be set to the geographic coordinates of the place. The list is empty when no access points are known or when the place is directly reachable.

    Declaration

    Swift

    public var accessPoints: [GeoCoordinates] { get }
  • The geographic coordinates of the map bounding box containing the place.

    Declaration

    Swift

    public var boundingBox: GeoBox? { get }
  • The distance from the search center to the place in meters.

    Declaration

    Swift

    public var distanceInMeters: Int32? { get }
  • The geopolitical view, defined as a three letter country code, each disputed territory has international and alternative views. Populated when the geopolitical view parameter is set in the SDKOptions and passed to SDKNativeEngine on instantiation, but only if it is an alternative view. For more details refer to SDKOptions.

    Declaration

    Swift

    public var politicalView: String? { get }
  • Declaration

    Swift

    public func serializeCompact() -> String

    Return Value

    The serialized place

  • Returns a Place created from serialized string.

    Throws

    PlaceSerializationException Indicates what went wrong during deserialization attempt.

    Declaration

    Swift

    public static func deserialize(serializedPlace: String) throws -> Place

    Parameters

    serializedPlace

    The serialized place

    Return Value

    A Place created from serialized string.