Class TextQuery.Area

  • java.lang.Object
    • com.here.sdk.search.TextQuery.Area
  • Enclosing class:
    TextQuery

    public static final class TextQuery.Area
    extends java.lang.Object

    Area to perform search on.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      GeoCoordinates areaCenter
      Geographic coordinates of the center around which to provide the most relevant places.
      GeoBox boxArea
      Geographic rectangle area in which to provide the most relevant places.
      GeoCircle circleArea
      Geographic circle area in which to provide the most relevant places.
      GeoCorridor corridorArea
      Geographic corridor area in which to provide the most relevant places.
      java.util.List<CountryCode> countries
      A list of countries that the query is applied in.
    • Constructor Summary

      Constructors 
      Constructor Description
      Area​(GeoBox boxArea)
      Constructs a new instance of this class from provided parameters.
      Area​(GeoCircle circleArea)
      Constructs a new instance of this class from provided parameters.
      Area​(GeoCoordinates areaCenter)
      Constructs a new instance of this class from provided parameters.
      Area​(GeoCorridor corridorArea, GeoCoordinates areaCenter)
      Constructs a new instance of this class from provided parameters.
      Area​(java.util.List<CountryCode> countries, GeoCoordinates areaCenter)
      Constructs a new instance of this class from provided parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • boxArea

        @Nullable
        public final GeoBox boxArea

        Geographic rectangle area in which to provide the most relevant places. For Offline Search, one of areaCenter, boxArea and circleArea has to be set, otherwise it will result in SearchError.INVALID_AREA. Also, for Offline Search, search in a given GeoBox restricts the results to only POIs.

      • circleArea

        @Nullable
        public final GeoCircle circleArea

        Geographic circle area in which to provide the most relevant places. For Offline Search, one of areaCenter, boxArea and circleArea has to be set, otherwise it will result in SearchError.INVALID_AREA. Also, for Offline Search, search in a given GeoCircle restricts the results to only POIs.

      • corridorArea

        @Nullable
        public final GeoCorridor corridorArea

        Geographic corridor area in which to provide the most relevant places. The contained polyline and half-width define the area that will be used in a search query.

        When used with SearchEngine, the polyline is compressed and sent. More complex polylines with large amounts of coordinates and with smaller half-width may have the less relevant part removed, such as the one far away from the search center. This usually makes no difference, because there will be enough POIs near the search center. For use cases where it is important to search the entire polyline, half-width can be increased or not set. For example: Route between New York and Chicago with half-width 800 will be added to request without removing the far away part, but route of the same length (around 360km) between Milan (Italy) and Konstanz (Germany) will have the far away part removed due to its complexity.

        When corridorArea is provided, areaCenter has to be within it, otherwise areaCenter is ignored when searching.

        For Offline Search, search in a given GeoCorridor restricts the results to only POIs.

      • countries

        @NonNull
        public final java.util.List<CountryCode> countries

        A list of countries that the query is applied in. Not supported in OfflineSearchEngine (not available in all editions).

    • Constructor Detail

      • Area

        public Area​(@NonNull
                    GeoCoordinates areaCenter)

        Constructs a new instance of this class from provided parameters.

        Parameters:
        areaCenter -

        Geographic coordinates of the center around which to provide the most relevant places.

      • Area

        public Area​(@NonNull
                    GeoBox boxArea)

        Constructs a new instance of this class from provided parameters. For Offline Search, search in a given GeoBox restricts the results to only POIs.

        Parameters:
        boxArea -

        Geographic rectangle area in which to provide the most relevant places.

      • Area

        public Area​(@NonNull
                    GeoCircle circleArea)

        Constructs a new instance of this class from provided parameters. For Offline Search, search in a given GeoCircle restricts the results to only POIs.

        Parameters:
        circleArea -

        Geographic circle area in which to provide the most relevant places.

      • Area

        public Area​(@NonNull
                    GeoCorridor corridorArea,
                    @NonNull
                    GeoCoordinates areaCenter)

        Constructs a new instance of this class from provided parameters. The given corridor and center define the area that will be used in the search query.

        When used with SearchEngine, the polyline is compressed and sent. More complex polylines with large amounts of coordinates and with smaller half-width may have the less relevant part removed, such as the one far away from the search center. This usually makes no difference, because there will be enough POIs near the search center. For use cases where it is important to search the entire polyline, half-width can be increased or not set. For example: Route between New York and Chicago with half-width 800 will be added to request without removing the far away part, but route of the same length (around 360km) between Milan (Italy) and Konstanz (Germany) will have the far away part removed due to its complexity.

        The area center has to be within the corridor, otherwise it is ignored.

        For Offline Search, search in a given GeoCorridor restricts the results to only POIs.

        Parameters:
        corridorArea -

        Geographic corridor area in which to provide the most relevant places.

        areaCenter -

        Geographic coordinates of the prioritized area center.

      • Area

        public Area​(@NonNull
                    java.util.List<CountryCode> countries,
                    @NonNull
                    GeoCoordinates areaCenter)

        Constructs a new instance of this class from provided parameters. The given list of countries and center define the area that will be used in the search query.

        Parameters:
        countries -

        A list of countries that the query is applied in.

        areaCenter -

        Geographic coordinates of the prioritized area center.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object