Maps API for JavaScript Developer's Guide

H.clustering.ICluster

Interface Summary

This interface encapsulates a cluster of data points, which fulfill the clustering specification (the data points are within the epsilon and there are enough points to form a cluster).

[ For full details, see the Interface Details ]

Method Summary

Table 1. Methods
Methods

getMaxZoom () : {number}

This method retrieves the maximum zoom level at which the given cluster does not break up into into sub-clusters and/or noise points.

getBounds () : {H.geo.Rect}

This method retrieves the bounding rectangle of the given cluster.

forEachEntry (callback)

This method invokes the specified callback for each "entry" of the cluster. That "entry" can be either a cluster which implements H.clustering.ICluster interface or a noise point which implements H.clustering.INoisePoint interface.

forEachDataPoint (callback)

This method invokes the specified callback for each data point in the given cluster.

getPosition () : {H.geo.Point}

This method retrieves the geographical position of the cluster result.

getWeight () : {number}

This method retrieves the weight of the cluster result.

isCluster () : {boolean}

This method retrieves a value indicating whether the cluster result is a cluster or a noise point.

getMinZoom () : {number}

This method retrieves the minimum zoom level at which the given item is not part of another cluster.

Interface Description

This interface encapsulates a cluster of data points, which fulfill the clustering specification (the data points are within the epsilon and there are enough points to form a cluster).

We can make an analogue with a Tree. In that case, the given cluster is a node in a tree, children of that node are sub-clusters and leaves of that sub-tree are the noise points.

Sub-clusters of a cluster can be seen on a map when changing the zoom level, as parent clusters split into smaller clusters and possible noise points.

Method Details

getMaxZoom () : {number}

This method retrieves the maximum zoom level at which the given cluster does not break up into into sub-clusters and/or noise points.

Returns:
 
{number}
A value indicating the highest zoom level at which the given cluster does not break into sub-clusters and/or noise points

getBounds () : {H.geo.Rect}

This method retrieves the bounding rectangle of the given cluster.

Returns:
 
{H.geo.Rect}
An object representing the bounding rectangle for the cluster

forEachEntry (callback)

This method invokes the specified callback for each "entry" of the cluster. That "entry" can be either a cluster which implements H.clustering.ICluster interface or a noise point which implements H.clustering.INoisePoint interface.

In an analogy to the example from the class description, the method traverses through all nodes of the tree beside the root.

Parameters:
 
callback:
{function(H.clustering.IResult)}
 
The callback to invoke. It receives the currently traversed entry as an argument, which is cluster or noise point

forEachDataPoint (callback)

This method invokes the specified callback for each data point in the given cluster.

In an analogy to the example from the class description, the method traverses only through the leaf nodes of the tree.

Parameters:
 
callback:
{function(H.clustering.INoisePoint)}
 
The callback to invoke. It receives the currently traversed noise point as argument.

getPosition () : {H.geo.Point}

This method retrieves the geographical position of the cluster result.

Returns:
 
{H.geo.Point}
An object containing the geographical coordinates of the location.

getWeight () : {number}

This method retrieves the weight of the cluster result.

Returns:
 
{number}
A value indicating the weight of the cluster result.

isCluster () : {boolean}

This method retrieves a value indicating whether the cluster result is a cluster or a noise point.

Returns:
 
{boolean}
true if the result is a cluster, otherwise false

getMinZoom () : {number}

This method retrieves the minimum zoom level at which the given item is not part of another cluster.

Returns:
 
{number}
A value indicating the minimum zoom level

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.