HERE Android SDK Developer's Guide

ClusterTheme

The class ClusterTheme is a member of com.here.android.mpa.cluster .

Class Summary

public class ClusterTheme

extends java.lang.Object

A mapping of cluster density ranges to cluster icon styles.

[For complete information, see the section Class Details]

See also:

setTheme(ClusterTheme)

Constructor Summary

Table 1. Constructors in ClusterTheme
Constructors

ClusterTheme ()

Creates a new theme with the default presentation style.

ClusterTheme (ClusterTheme theme)

Creates a new theme by copying ranges and styles from another.

Method Summary

Table 2. Methods in ClusterTheme
Methods

public void setStyleForDensityRange (int from, int to, ClusterStyle style)

Sets particular style for a specific range.

public void setStyleForDensityRange (ClusterDensityRange range, ClusterStyle style)

Sets particular style for a specific range.

Class Details

A mapping of cluster density ranges to cluster icon styles. Cluster density represents the number of markers inside a cluster.

See also:

setTheme(ClusterTheme)

Constructor Details

ClusterTheme ()

Creates a new theme with the default presentation style.

ClusterTheme (ClusterTheme theme)

Creates a new theme by copying ranges and styles from another.

Parameters:

  • theme

    theme to copy from

Method Details

public void setStyleForDensityRange (int from, int to, ClusterStyle style)

Sets particular style for a specific range. Ranges set by this method should be valid and cannot overlap.

The default style is used for the ranges not set manually.

Parameters:

  • from

    lower density range limit (inclusive), must be greater than MINIMUM_CLUSTER_DENSITY

  • to

    upper density range limit (inclusive), must be greater than or equal to lower limit

  • style

    style for this range

Throws:

  • IllegalArgumentException

    If one of the following occurs: the lower limit is smaller than MINIMUM_CLUSTER_DENSITY, the lower limit is greater than the upper limit, or the range overlaps with one of the already added ranges to this theme.

  • NullPointerException

    if style is null

See also:

setStyleForDensityRange(ClusterDensityRange, ClusterStyle)

public void setStyleForDensityRange (ClusterDensityRange range, ClusterStyle style)

Sets particular style for a specific range. Ranges set by this method should be valid and cannot overlap.

The default style is used for the ranges not set manually.

Parameters:

  • range

    density range

  • style

    style for this range

Throws:

  • IllegalArgumentException

    if the range overlaps with one of the already added ranges to this theme

  • NullPointerException

    if range or style is null