HERE Android SDK Developer's Guide

DiscoveryRequest

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

Class Summary

public class DiscoveryRequest

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

Represents an extended Request used to retrieve a DiscoveryResultPage object by way of Places search services.

[For complete information, see the section Class Details]

See also:

ExploreRequest

HereRequest

SearchRequest

Method Summary

Table 1. Methods in DiscoveryRequest
Methods

public DiscoveryRequest addBuildingFilter (String buildingId)

public void addImageDimensions (int width, int height)

Request Image Media with specific dimensions.

public DiscoveryRequest addReference (String name)

This function adds the name of a requested reference identifiers to be returned in the results.

public ErrorCode execute (ResultListener<DiscoveryResultPage> eventListener)

Executes an asynchronous request.

public int getCollectionSize ()

Gets the current collection size being used for request responses.

public List getReferences ()

This function returns the names of requested reference identifiers to be returned in the results.

public RichTextFormatting getRichTextFormatting ()

Gets the current RichTextFormatting type being used in request responses.

protected DiscoveryRequest setCategoryFilter (CategoryFilter filter)

public DiscoveryRequest setCollectionSize (int value)

Sets a collection size to be used for request responses.

public DiscoveryRequest setMapViewport (GeoBoundingBox mapViewport)

The map viewport is a bounding box of the map area currently visible to the user.

public DiscoveryRequest setRichTextFormatting (RichTextFormatting value)

Sets a RichTextFormatting to be used in request responses.

protected DiscoveryRequest setSearchArea (GeoCoordinate coordinate, int radius)

protected DiscoveryRequest setSearchArea (GeoBoundingBox area)

protected DiscoveryRequest setSearchCenter (GeoCoordinate coordinate)

Class Details

Represents an extended Request used to retrieve a DiscoveryResultPage object by way of Places search services.

See also:

ExploreRequest

HereRequest

SearchRequest

Method Details

public DiscoveryRequest addBuildingFilter (String buildingId)

Parameters:

  • buildingId

public void addImageDimensions (int width, int height)

Request Image Media with specific dimensions. At least one of the sizes (width or height) needs to be valid (greater than 0).

Parameters:

  • width

    Image width (pass 0 for any width)

  • height

    Image height (pass 0 for any height)

public DiscoveryRequest addReference (String name)

This function adds the name of a requested reference identifiers to be returned in the results. For example, to retrieve an extruded building identifier, set this value to BUILDING_ID_REFERENCE_NAME .

Parameters:

  • name

    Name of reference identifier to retrieve.

Returns:

True if name added, false otherwise.

public ErrorCode execute (ResultListener<DiscoveryResultPage> eventListener)

Executes an asynchronous request.

Parameters:

  • eventListener

    A ResultListener passed along with the request to monitor progress

Returns:

The ErrorCode representing an appropriate result

public int getCollectionSize ()

Gets the current collection size being used for request responses.

Returns:

The current response collection size

public List getReferences ()

This function returns the names of requested reference identifiers to be returned in the results.

Returns:

List of the names of reference identifiers to be returned in the result.

public RichTextFormatting getRichTextFormatting ()

Gets the current RichTextFormatting type being used in request responses.

Returns:

The current RichTextFormatting type

protected DiscoveryRequest setCategoryFilter (CategoryFilter filter)

Parameters:

  • filter

public DiscoveryRequest setCollectionSize (int value)

Sets a collection size to be used for request responses. The maximum number of result items in each collection will be limited to this value. The valid value range is [1..100]. The default collection size is 20.

Parameters:

  • value

    Desired response collection size per request.

Returns:

This DiscoveryRequest object

public DiscoveryRequest setMapViewport (GeoBoundingBox mapViewport)

The map viewport is a bounding box of the map area currently visible to the user. The viewport can act as an implicit location context in the absence of an explicit location context. To ensure you get the best results possible, you should always set a viewport if there is a map visible to the user.

Parameters:

  • mapViewport

    The bounding box of the map area currently visible.

public DiscoveryRequest setRichTextFormatting (RichTextFormatting value)

Sets a RichTextFormatting to be used in request responses. The default formatting is HTML.

Parameters:

  • value

    Desired RichTextFormatting

Returns:

This DiscoveryRequest object

protected DiscoveryRequest setSearchArea (GeoCoordinate coordinate, int radius)

Parameters:

  • coordinate
  • radius

protected DiscoveryRequest setSearchArea (GeoBoundingBox area)

Parameters:

  • area

protected DiscoveryRequest setSearchCenter (GeoCoordinate coordinate)

Parameters:

  • coordinate

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.