Class Place


  • public final class Place
    extends NativeBase

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

    • Method Detail

      • deserialize

        @NonNull
        public static Place deserialize​(@NonNull
                                        java.lang.String serializedPlace)
                                 throws PlaceSerializationException

        Returns a Place created from serialized string.

        Parameters:
        serializedPlace -

        The serialized place

        Returns:

        A Place created from serialized string.

        Throws:
        PlaceSerializationException -

        Indicates what went wrong during deserialization attempt.

      • getTitle

        @NonNull
        public java.lang.String getTitle()

        Gets the localized title for the resource.

        Returns:

        The localized title for the resource.

      • getId

        @NonNull
        public java.lang.String getId()

        Gets 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.

        Returns:

        The unique id of this resource. It can be used to query further information.

      • getPlaceType

        @NonNull
        public PlaceType getPlaceType()

        Gets the place type.

        Returns:

        The place type.

      • getAddress

        @NonNull
        public Address getAddress()

        Gets 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.

        Returns:

        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.

      • getDetails

        @NonNull
        public Details getDetails()

        Gets the place's detailed information.

        Returns:

        The place's detailed information.

      • getGeoCoordinates

        @Nullable
        public GeoCoordinates getGeoCoordinates()

        Gets the geographic coordinates of the place.

        Can be null when retrieved from a suggestion's place property.

        Returns:

        The geographic coordinates of the place.

      • isCoordinatesInterpolated

        public boolean isCoordinatesInterpolated()

        Gets the flag saying 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 getGeoCoordinates() point to an accurate position of the house. Otherwise coordinates are slightly less accurate, but are based on a highly optimized interpolation algorithm.

        Returns:

        A property that says whether the coordinates of the house number were interpolated or not.

      • getAccessPoints

        @NonNull
        public java.util.List<GeoCoordinates> getAccessPoints()

        Gets 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.

        Returns:

        The access points to the place, such as the points on a road or in a parking lot.

      • getBoundingBox

        @Nullable
        public GeoBox getBoundingBox()

        Gets the geographic coordinates of the bounding box containing the place.

        Returns:

        The geographic coordinates of the map bounding box containing the place.

      • getDistanceInMeters

        @Nullable
        public java.lang.Integer getDistanceInMeters()

        Gets the distance from the search center to the place in meters.

        Returns:

        The distance from the search center to the place in meters.

      • getPoliticalView

        @Nullable
        public java.lang.String getPoliticalView()

        Gets 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.

        Returns:

        The geopolitical view, defined as a three letter country code, each disputed territory has international and alternative views.