HERE Android SDK Developer's Guide

SearchRequest

The class SearchRequest is a member of com.here.android.mpa.search .

Class Summary

public class SearchRequest

extends com.here.android.mpa.search.DiscoveryRequest, com.here.android.mpa.search.Request, java.lang.Object

The SearchRequest processes text string queries based on the user's input to find specific places.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in SearchRequest
Constructors

SearchRequest (String query)

SearchRequest constructor

Method Summary

Table 2. Methods in SearchRequest
Methods

public ErrorCode execute (ResultListener<DiscoveryResultPage> listener)

Executes an asynchronous request.

public SearchRequest setQueryText (String query)

Set the search query text.

public SearchRequest setSearchCenter (GeoCoordinate center)

Sets a GeoCoordinate representing the location context used to search for results that are appropriate to the query parameter.

Class Details

The SearchRequest processes text string queries based on the user's input to find specific places. It answers questions of "what" and "where" for an online search of POI or address.

The results of the SearchRequest are sets of places that match a user's search term in a specific location context (such as near a given location, around a user's current position or on the currently visible map).

A search location context must be provided by setting a search center location using setSearchCenter(GeoCoordinate) or a bounding map viewport using setMapViewport(GeoBoundingBox) or both. Failing to set a location context will result in an INVALID_PARAMETER when executing the request.

Constructor Details

SearchRequest (String query)

SearchRequest constructor

Parameters:

  • query

    Query text specifying the kind of places to locate

Method Details

public ErrorCode execute (ResultListener<DiscoveryResultPage> listener)

Executes an asynchronous request.

Parameters:

  • listener

    A ResultListener passed along with the request to monitor progress

Returns:

The ErrorCode representing an appropriate result

public SearchRequest setQueryText (String query)

Set the search query text.

Parameters:

  • query

    Query text specifying the kind of places to locate

Returns:

The SearchRequest

public SearchRequest setSearchCenter (GeoCoordinate center)

Sets a GeoCoordinate representing the location context used to search for results that are appropriate to the query parameter.

Parameters:

  • center

    A GeoCoordinate representing the location context used to search for results that are appropriate to the query parameter.

Returns:

The SearchRequest

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.