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 } -
The unique id of this resource. It can be used to query further information. When returned from
OfflineSearchEngine,idis valid only forPlaceobjects whoseplace_typeisPOI. 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.placeTypeisPlaceType.area.Declaration
Swift
public var areaType: AreaType? { get } -
The address of the place.
Note that while
OfflineSearchEngine.suggestandOfflineSearchEngine.suggestByTextset all available details,SearchEngine.suggestandSearchEngine.suggestByTextset onlyAddress.addressText. Complete address details can be obtained by searching withPlaceIdQuery.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
nilwhen 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.geoCoordinatespoint 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
sideOfStreetHintshould 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 thesideOfStreetHintshould 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
SDKOptionsand passed toSDKNativeEngineon instantiation, but only if it is an alternative view. For more details refer toSDKOptions.Declaration
Swift
public var politicalView: String? { get } -
Serializes
Placeto persist or transfer. Preserves limited amount of data:Declaration
Swift
public func serializeCompact() -> StringReturn Value
The serialized place
-
Returns a
Placecreated from serialized string.Throws
PlaceSerializationExceptionIndicates what went wrong during deserialization attempt.Declaration
Swift
public static func deserialize(serializedPlace: String) throws -> PlaceParameters
serializedPlaceThe serialized place
Return Value
A
Placecreated from serialized string.