HERE Android SDK Developer's Guide

PlaceLink

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

Class Summary

public class PlaceLink

extends com.here.android.mpa.search.DiscoveryResult, com.here.android.mpa.search.Link, java.lang.Object

Represents discovery information about a Place .

[For complete information, see the section Class Details]

Method Summary

Table 1. Methods in PlaceLink
Methods

public boolean equals (Object obj)

For documentation, see java.lang.Object

public List getAlternativeReferenceIds (String name)

Get a list of alternative identifiers of the same reference identifier for a specific domain.

public double getAverageRating ()

Gets the average rating for a Place.

public GeoBoundingBox getBoundingBox ()

Gets the GeoBoundingBox describing a range of coordinates that correspond to the Place.

public Category getCategory ()

Gets the Category for the Place.

public PlaceRequest getDetailsRequest ()

Creates a request to retrieve the Place details.

public double getDistance ()

Gets the distance to the Place, in meters.

public GeoCoordinate getPosition ()

Gets the GeoCoordinate representing the geographical position of the Place.

public String getReference (String name)

Get the reference identifier for a specific domain.

public int hashCode ()

For documentation, see java.lang.Object

public boolean isSponsored ()

Determines whether the search result is sponsored.

Class Details

Represents discovery information about a Place .

Note: detailed Place information is retrieved by way of the PlaceRequest returned from a call to the getDetailsRequest() method.

Method Details

public boolean equals (Object obj)

For documentation, see java.lang.Object

Parameters:

  • obj

public List getAlternativeReferenceIds (String name)

Get a list of alternative identifiers of the same reference identifier for a specific domain. For example, a venue content identifier reference can have alternative identifiers. The list of alternative identifiers can be retrieved by calling this method with name "venues.content".

NOTE: A reference will not be returned if it has not been queried with the DiscoveryRequest#addReference(String) function.

Parameters:

  • name

    The reference name.

Returns:

The list of alternative identifiers. If alternative identifiers are not

public double getAverageRating ()

Gets the average rating for a Place.

Note: the average rating is set to zero for places with no ratings.

Returns:

The average rating

public GeoBoundingBox getBoundingBox ()

Gets the GeoBoundingBox describing a range of coordinates that correspond to the Place. Typically, bounding boxes are associated with places such as cities and countries.

Note: bounding box information for a Place is optional, so a call to this method could return null .

Returns:

The GeoBoundingBox containing the Place (could be null)

public Category getCategory ()

Gets the Category for the Place.

Note: a category is optional (especially when offline), so a call to this method could return null .

Returns:

The Category

public PlaceRequest getDetailsRequest ()

Creates a request to retrieve the Place details. Each call to this method creates a new request object.

Returns:

The PlaceRequest to retrieve the Place details

public double getDistance ()

Gets the distance to the Place, in meters.

Note: When the distance is set to zero, no distance value is available. The application is expected to perform the calculation if a distance is required (use distanceTo(GeoCoordinate) along with the user current position via getPosition()).

Returns:

The distance

public GeoCoordinate getPosition ()

Gets the GeoCoordinate representing the geographical position of the Place.

Returns:

The GeoCoordinate

public String getReference (String name)

Get the reference identifier for a specific domain. For example, a place can have a reference to an extruded building object in the map. The reference identifier can be retrieved by calling this method with name BUILDING_ID_REFERENCE_NAME .

NOTE: A reference will not be returned if it has not been added to the request using DiscoveryRequest#addReference(String) .

Parameters:

  • name

    The reference name.

Returns:

The reference identifier. If the reference identifier does not exist, an empty String is returned.

public int hashCode ()

For documentation, see java.lang.Object

public boolean isSponsored ()

Determines whether the search result is sponsored. Applications must provide some visual differentiation between sponsored search results and regular search results.

Returns:

True if the search result is sponsored, false otherwise

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.