HERE Android SDK Developer's Guide

HereRequest

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

Class Summary

public class HereRequest

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

The HereRequest answers the questions "Where am I?" and "What's right here where I am standing?" The search results consist of a list of places with addresses that lie within the vicinity of the search location.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in HereRequest
Constructors

HereRequest ()

Default constructor.

Method Summary

Table 2. Methods in HereRequest
Methods

public HereRequest addBuildingFilter (String buildingId)

Sets a search filter based on building identifier.

public ErrorCode execute (ResultListener<DiscoveryResultPage> listener)

Executes an asynchronous request.

public HereRequest setCategoryFilter (CategoryFilter filter)

Sets a search filter based on categories.

public HereRequest setSearchCenter (GeoCoordinate center)

Sets the search center.

Class Details

The HereRequest answers the questions "Where am I?" and "What's right here where I am standing?" The search results consist of a list of places with addresses that lie within the vicinity of the search location. The feature is typically used by applications that include "check-in" or "click on map to get more information" options.

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

Constructor Details

HereRequest ()

Default constructor.

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

Method Details

public HereRequest addBuildingFilter (String buildingId)

Sets a search filter based on building identifier. More than one building identifier filter can be applied per request.

The building identifier can also be retrieved using addReference(String) and getReference(String) (or addReference(String) and getReference(String)).

Parameters:

  • buildingId

    A building identifier. When a filter is specified, the result items will be limited to the buildings with identifiers defined in the filter.

Returns:

The HereRequest.

See also:

http://places.api.here.com/places/static/doc/public/#topics/external-references.html

Request <T> #BUILDING_ID_REFERENCE_NAME

addReference(String)

getReference(String)

addReference(String)

getReference(String)

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 HereRequest setCategoryFilter (CategoryFilter filter)

Sets a search filter based on categories.

Parameters:

  • filter

    A CategoryFilter representing the category filter. When a CategoryFilter is specified, the result items will be limited to the categories defined in the filter.

Returns:

The HereRequest.

public HereRequest setSearchCenter (GeoCoordinate center)

Sets the search center.

Parameters:

  • center

    The GeoCoordinate representing the location context used to search for nearby places.

Returns:

The HereRequest.