HERE Android SDK Developer's Guide

AroundRequest

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

Class Summary

public class AroundRequest

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

The AroundRequest represents sets of places within a specific location context, usually the location of the user.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in AroundRequest
Constructors

AroundRequest ()

Default constructor.

Method Summary

Table 2. Methods in AroundRequest
Methods

public ErrorCode execute (ResultListener<DiscoveryResultPage> listener)

Executes an asynchronous request.

public AroundRequest setCategoryFilter (CategoryFilter filter)

Sets a search filter based on categories.

public AroundRequest setSearchArea (GeoCoordinate center, int radius)

Sets the search area using a center location and radius.

public AroundRequest setSearchArea (GeoBoundingBox boundingArea)

Sets the search area using a GeoBoundingBox .

public AroundRequest setSearchCenter (GeoCoordinate center)

Sets the search center.

Class Details

The AroundRequest represents sets of places within a specific location context, usually the location of the user. This request is intended for applications that employ features such as augmented reality, where places around the user's location are displayed on a device. It is intended to provide places that are likely to be visible to the user as well as important places that are further away.

The AroundRequest allows users to request places near to a given location or area. The places around the location context are returned in order of proximity.

A search location context must be provided by setting either a search center using setSearchCenter(GeoCoordinate), a search area using setSearchArea(GeoCoordinate, int) or setSearchArea(GeoBoundingBox) or a bounding map viewport using Request%3CT%3E#setMapViewport(GeoBoundingBox). Failing to set a map viewport will result in an INVALID_PARAMETER when executing the request.

Constructor Details

AroundRequest ()

Default constructor.

A search location context must be provided by setting either a search center using setSearchCenter(GeoCoordinate), a search area using setSearchArea(GeoCoordinate, int) or setSearchArea(GeoBoundingBox) or a bounding map viewport using Request%3CT%3E#setMapViewport(GeoBoundingBox). Failing to set a map viewport will result in an INVALID_PARAMETER when executing the request.

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

public AroundRequest setSearchArea (GeoCoordinate center, int radius)

Sets the search area using a center location and radius.

Parameters:

  • center

    The GeoCoordinate representing the search area center location.

  • radius

    The search area circle radius in meters.

Returns:

The AroundRequest.

public AroundRequest setSearchArea (GeoBoundingBox boundingArea)

Sets the search area using a GeoBoundingBox .

Parameters:

  • boundingArea

    The GeoBoundingBox representing the search area.

Returns:

The AroundRequest.

public AroundRequest setSearchCenter (GeoCoordinate center)

Sets the search center.

Parameters:

  • center

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

Returns:

The AroundRequest.