Class BaseSearchOptions

java.lang.Object
com.azure.maps.search.models.BaseSearchOptions

public class BaseSearchOptions extends Object
Class holding optional parameters for Search.
  • Constructor Details

    • BaseSearchOptions

      public BaseSearchOptions()
      Creates a new instance of BaseSearchOptions.
  • Method Details

    • setTop

      public BaseSearchOptions setTop(Integer top)
      Sets the maximum number of responses that will be returned for a search query, enabling control over the response size.
      Parameters:
      top - Maximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20.
      Returns:
      BaseSearchOptions
    • getQuery

      public String getQuery()
      Retrieves the query string representing a location, such as an address or landmark.
      Returns:
      query
    • setQuery

      public BaseSearchOptions setQuery(String query)
      Sets the query string used to specify a location for the search request.
      Parameters:
      query - A string that contains information about a location, such as an address or landmark name.
      Returns:
      BaseSearchOptions
    • getAddressLine

      public String getAddressLine()
      Retrieves the address line associated with the search options.
      Returns:
      addressLine
    • setAddressLine

      public BaseSearchOptions setAddressLine(String addressLine)
      Sets the street address line for a more specific location in the search query.
      Parameters:
      addressLine - The official street line of an address relative to the area, as specified by the locality, or postalCode, properties. Typical use of this element would be to provide a street address or any official address.
      Returns:
      BaseSearchOptions
    • getView

      public String getView()
      Retrieves the region-specific view parameter that affects geopolitical labeling.
      Returns:
      view
    • setView

      public BaseSearchOptions setView(String view)
      Sets the view parameter to align geopolitical borders and labels with a specific region.
      Parameters:
      view - A string that represents an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will alter Geopolitical disputed borders and labels to align with the specified user region. By default, the View parameter is set to “Auto” even if you haven’t defined it in the request.
      Returns:
      BaseSearchOptions
    • setBoundingBox

      public BaseSearchOptions setBoundingBox(com.azure.core.models.GeoBoundingBox boundingBox)
      Sets a rectangular geographical area for focusing the search within defined boundaries.
      Parameters:
      boundingBox - A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by longitude and latitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.
      Returns:
      BaseSearchOptions
    • getCountryRegion

      public String getCountryRegion()
      Retrieves the country or region code used to filter search results.
      Returns:
      countryRegion
    • setCountryRegion

      public BaseSearchOptions setCountryRegion(String countryRegion)
      Sets the country or region code to narrow down the search results.
      Parameters:
      countryRegion - Signal for the geocoding result to an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) that is specified e.g. FR./
      Returns:
      BaseSearchOptions
    • getAdminDistrict2

      public String getAdminDistrict2()
      Retrieves the secondary administrative district for the search options.
      Returns:
      adminDistrict2
    • setAdminDistrict2

      public BaseSearchOptions setAdminDistrict2(String adminDistrict2)
      Sets the secondary administrative district to refine the search query.
      Parameters:
      adminDistrict2 - The county for the structured address, such as King.
      Returns:
      BaseSearchOptions
    • getLocality

      public String getLocality()
      Retrieves the locality or city specified in the search options.
      Returns:
      locality
    • setLocality

      public BaseSearchOptions setLocality(String locality)
      Sets the locality or city to narrow the search results to a specific area.
      Parameters:
      locality - The locality portion of an address, such as Seattle.
      Returns:
      BaseSearchOptions
    • getPostalCode

      public String getPostalCode()
      Retrieves the postal code used in the search query.
      Returns:
      postalCode
    • setPostalCode

      public BaseSearchOptions setPostalCode(String postalCode)
      Sets the postal code for a more targeted search result.
      Parameters:
      postalCode - The postal code portion of an address.
      Returns:
      BaseSearchOptions
    • getAdminDistrict3

      public String getAdminDistrict3()
      Retrieves the third-level administrative district for the search query.
      Returns:
      adminDistrict3
    • setAdminDistrict3

      public BaseSearchOptions setAdminDistrict3(String adminDistrict3)
      Sets the third-level administrative district to refine the search.
      Parameters:
      adminDistrict3 - The named area for the structured address.
      Returns:
      BaseSearchOptions
    • getAdminDistrict

      public String getAdminDistrict()
      Retrieves the first-level administrative district (e.g., a state or province) for the search options.
      Returns:
      adminDistrict
    • setAdminDistrict

      public BaseSearchOptions setAdminDistrict(String adminDistrict)
      Sets the first-level administrative district to refine the search query.
      Parameters:
      adminDistrict - The country subdivision portion of an address, such as WA.
      Returns:
      BaseSearchOptions
    • getCoordinates

      public com.azure.core.models.GeoPosition getCoordinates()
      Retrieves the geographic coordinates (latitude and longitude) used for location-based search relevance.
      Returns:
      coordinates
    • setCoordinates

      public BaseSearchOptions setCoordinates(com.azure.core.models.GeoPosition coordinates)
      Sets the geographic coordinates to enhance the relevance of search results based on location.
      Parameters:
      coordinates - A point on the earth specified as a longitude and latitude. When you specify this parameter, the user’s location is taken into account and the results returned may be more relevant to the user. Example: &coordinates=lon,lat.
      Returns:
      BaseSearchOptions
    • getTop

      public Integer getTop()
      Retrieves the maximum number of search responses allowed. Returns the top value.
      Returns:
      the top value.
    • getBoundingBox

      public Optional<com.azure.core.models.GeoBoundingBox> getBoundingBox()
      Retrieves the geographical bounding box defined for the search. Returns the GeoBoundingBox.
      Returns:
      GeoBoundingBox