HERE Android SDK Developer's Guide

ExploreRequest

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

Class Summary

public class ExploreRequest

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

Creates a ExploreRequest using a specified location context and category filter.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in ExploreRequest
Constructors

ExploreRequest ()

Default constructor.

Method Summary

Table 2. Methods in ExploreRequest
Methods

public ErrorCode execute (ResultListener<DiscoveryResultPage> listener)

Executes an asynchronous request.

public ExploreRequest setCategoryFilter (CategoryFilter filter)

Sets a search filter based on categories.

public ExploreRequest setSearchArea (GeoCoordinate center, int radius)

Sets the search area using a center location and radius.

public ExploreRequest setSearchArea (GeoBoundingBox boundingArea)

Sets the search area using a GeoBoundingBox .

public ExploreRequest setSearchCenter (GeoCoordinate center)

Sets the search center.

Class Details

Creates a ExploreRequest using a specified location context and category filter. An explore request is used for retrieving a list of nearby relevant places for a given position. It answers the question "What interesting places are near a location?" The results returned are confined to those located in the current search area and are ordered by popularity. If a category filter is provided, the created request will limit results to include only items with the specified categories.

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 setMapViewport(GeoBoundingBox). Failing to set a map viewport will result in an INVALID_PARAMETER when executing the request.

Constructor Details

ExploreRequest ()

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

public ExploreRequest 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 ExploreRequest.

public ExploreRequest setSearchArea (GeoBoundingBox boundingArea)

Sets the search area using a GeoBoundingBox .

Parameters:

  • boundingArea

    The GeoBoundingBox representing the search area.

Returns:

The ExploreRequest.

public ExploreRequest setSearchCenter (GeoCoordinate center)

Sets the search center.

Parameters:

  • center

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

Returns:

The ExploreRequest.