HERE Android SDK Developer's Guide

PlaceRequest

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

Class Summary

public class PlaceRequest

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

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

[For complete information, see the section Class Details]

See also:

ExploreRequest

HereRequest

SearchRequest

Constructor Summary

Table 1. Constructors in PlaceRequest
Constructors

PlaceRequest (String source, String id)

Creates a PlaceRequest based on an external reference source and identifier.

Method Summary

Table 2. Methods in PlaceRequest
Methods

public void addContent (String placeContent)

Requests specific EditorialMedia by providing one of the available place content sources.

public void addImageDimensions (int width, int height)

Request Image Media with specific dimensions.

public PlaceRequest addReference (String name)

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

public ErrorCode execute (ResultListener<Place> listener)

Executes an asynchronous request.

public Set getContent ()

Returns the names of requested place content sources that was added using addContent(String).

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.

public PlaceRequest setRichTextFormatting (RichTextFormatting value)

Sets a RichTextFormatting to be used in request responses.

Class Details

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

See also:

ExploreRequest

HereRequest

SearchRequest

Constructor Details

PlaceRequest (String source, String id)

Creates a PlaceRequest based on an external reference source and identifier.

Parameters:

  • source

    Name of the external reference source.

  • id

    The identifier of the requested place in external system.

See also:

addReference(String)

PVID_ID_REFERENCE_NAME

VENUES_ID_REFERENCE_NAME

VENUES_CONTENT_ID_REFERENCE_NAME

VENUES_DESTINATION_ID_REFERENCE_NAME

VENUES_VENUE_ID_REFERENCE_NAME

getReference(String)

getReference(String)

Method Details

public void addContent (String placeContent)

Requests specific EditorialMedia by providing one of the available place content sources. Currently only PLACE_CONTENT_WIKIPEDIA is available.

Parameters:

  • placeContent

    non-empty name for place content source.

See also:

PLACE_CONTENT_WIKIPEDIA

getEditorials()

EditorialMedia

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 PlaceRequest 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<Place> 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 Set getContent ()

Returns the names of requested place content sources that was added using addContent(String).

Returns:

non-null list of the content source names.

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

public PlaceRequest setRichTextFormatting (RichTextFormatting value)

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

Parameters:

  • value

    Desired RichTextFormatting

Returns:

This PlaceRequest object