HERE Android SDK Developer's Guide

CLE2Geometry

The class CLE2Geometry is a member of com.here.android.mpa.customlocation2 .

Class Summary

public class CLE2Geometry

extends java.lang.Object

Specifies a user-defined geometry.

[For complete information, see the section Class Details]

Method Summary

Table 1. Methods in CLE2Geometry
Methods

public boolean equals (Object obj)

For documentation, see java.lang.Object

public Map getAttributes ()

Returns the Map of attributes containing a copy of the custom attributes of this CLE2Geometry

public double getDistance ()

Returns the minimum distance to the geometry from the point used in a search query.

public String getGeometryId ()

Identifier of a geometry object.

public int hashCode ()

For documentation, see java.lang.Object

public boolean isLocal ()

Checks if this geometry is local to the device or if it came from remote CLE service.

public void setAttribute (String name, String value)

Set a value of an attribute for this geometry.

public void setAttributes (Map attributes)

Sets attributes of this geometry to the ones provided.

Class Details

Specifies a user-defined geometry. This geometry can be a PointGeometry , MultiPointGeometry, PolylineGeometry, MultiPolylineGeometry, PolygonGeometry or MultiPolygonGeometry.

Method Details

public boolean equals (Object obj)

For documentation, see java.lang.Object

Parameters:

  • obj

public Map getAttributes ()

Returns the Map of attributes containing a copy of the custom attributes of this CLE2Geometry

Returns:

Map of attributes

public double getDistance ()

Returns the minimum distance to the geometry from the point used in a search query.

Returns:

A float representing distance of this geometry to the point used in the query or 0 if it is unknown or search query was performed offline.

public String getGeometryId ()

Identifier of a geometry object. This identifier is guaranteed to be unique only within a single layer, meaning that two geometry object belonging to different layers might have the same geometry ID. Only geometries that were once stored locally or remotely have an ID. Meaning that a newly created geometry object does not have an ID.

Returns:

identifier unique within a single layer or null if this geometry does not have an ID.

public int hashCode ()

For documentation, see java.lang.Object

public boolean isLocal ()

Checks if this geometry is local to the device or if it came from remote CLE service. Geometry that is stored locally but was initially retrieved from the server (for example, by downloading a whole layer or caching of search results) is not considered local.

Returns:

false if source of this geometry is a remote CLE2 service, true otherwise

public void setAttribute (String name, String value)

Set a value of an attribute for this geometry.

Parameters:

  • name

    name of the attribute to set

  • value

    value of the attribute to set

Throws:

  • IllegalArgumentException

    if the name or value are null or name is an empty string.

public void setAttributes (Map attributes)

Sets attributes of this geometry to the ones provided. The content of the provided map is copied and any changes made to it or the values within it afterwards have no effect on the attributes of this geometry object.

attributes can be null or empty and in both cases it will cause removal of all the attributes from this geometry.

Parameters:

  • attributes

    map of attributes to set for this geometry.

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.