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 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 ()

Gets the 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 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.

This bounding box does not necessarily have the location from getPosition() as its center. For example, if the search was performed with a street name, this bounding box may be one that contains the entire street, while getPosition() can be any point along the street.

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 ()

Gets the request to retrieve the Place details.

Returns:

The PlaceRequest to retrieve the Place details

public double getDistance ()

Gets the distance to the Place, in meters.

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 Request<T>#addReference .

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