HERE Android SDK Developer's Guide

CLE2Request

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

Class Summary

public class CLE2Request

extends java.lang.Object

Represents a custom location search request.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in CLE2Request
Nested Classes

public static final enumeration CLE2Request.CLE2ConnectivityMode

Specifies the connectivity mode for a request.

public static class CLE2Request.CLE2Error

Represents values describing possible search request errors.

public static final enumeration CLE2Request.CLE2GeometryType

Specifies the geometry representation in the result.

public static abstract interface CLE2Request.CLE2ResultListener

Represents a listener that reports information about the completion of a custom location search CLE2Request.

Method Summary

Table 2. Methods in CLE2Request
Methods

public void cancel ()

Cancels a search request in progress.

public boolean equals (Object other)

For documentation, see java.lang.Object

public String execute (CLE2ResultListener listener)

Executes the asynchronous custom location request.

public CLE2ConnectivityMode getConnectivityMode ()

Get request mode for this CLE2Request.

public int hashCode ()

For documentation, see java.lang.Object

public CLE2Request setCachingEnabled (boolean cache)

Set if request output geometries should be stored locally.

public CLE2Request setConnectivityMode (CLE2ConnectivityMode mode)

Sets the connectivity mode for this CLE2Request.

public CLE2Request setGeometry (CLE2GeometryType geometry)

Sets the geometry representation in request.

public CLE2Request setQuery (String query)

Specifies the filter(s) to be used for a custom location request.

Class Details

Represents a custom location search request.

Method Details

public void cancel ()

Cancels a search request in progress. Otherwise, nothing happens.

public boolean equals (Object other)

For documentation, see java.lang.Object

Parameters:

  • other

public String execute (CLE2ResultListener listener)

Executes the asynchronous custom location request.

Parameters:

Returns:

NONE if request is sent successfully, otherwise, error message.

Throws:

  • IllegalArgumentException

    if listener is {code null}.

public CLE2ConnectivityMode getConnectivityMode ()

Get request mode for this CLE2Request.

public int hashCode ()

For documentation, see java.lang.Object

public CLE2Request setCachingEnabled (boolean cache)

Set if request output geometries should be stored locally. Default is false.

Please note that, if enabled, only FULL response will be stored. Other CLE2Request.CLE2GeometryType response will not be stored.

Parameters:

  • cache

    boolean indicating store response or not.

Returns:

updated CLE2Request for chaining operation.

public CLE2Request setConnectivityMode (CLE2ConnectivityMode mode)

Sets the connectivity mode for this CLE2Request. Default mode is ONLINE.

Please note that CLE2AttributeRequest only supports ONLINE mode.

Parameters:

Returns:

updated CLE2Request for chaining operation.

Throws:

public CLE2Request setGeometry (CLE2GeometryType geometry)

Sets the geometry representation in request.

Default value for all request is FULL.

When using OFFLINE or AUTO, only FULL is supported. Also, CLE2AttributeRequest only supports FULL.

Parameters:

  • geometry

Returns:

current instance for chaining operation.

Throws:

public CLE2Request setQuery (String query)

Specifies the filter(s) to be used for a custom location request. When specified, only geometries where expression evaluates to true will be returned. An example query can be like this "RATING > 3 && NAME != 'MyPlace23'" where RATING and NAME are column names.

Please note that this method is only supported in ONLINE.

Parameters:

  • query

    A JavaScript expression as a string being evaluated for each geometry.

Returns:

current instance for chaining operation.

Throws:

  • IllegalArgumentException

    if query is empty.

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.