Maps API for JavaScript Developer's Guide

H.clustering.ICluster

Interface Summary

This interface describes a cluster of data points, which fulfill the clustering specification (i.e. 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}

Returns the maximum zoom level where this cluster doesn't fall apart into sub clusters and/or noise poinst

getBounds () : {H.geo.Rect}

Returns the bounding rectangle of this cluster.

forEachEntry (callback)

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)

Invokes the specified callback for each data point which is part of this cluster, even indirectly.

getPosition () : {H.geo.Point}

Returns the geographical position of this cluster result.

getWeight () : {number}

Returns the weight of this cluster result.

isCluster () : {boolean}

To indicate whether this cluster result is a cluster or noise point

getMinZoom () : {number}

Returns the minimum zoom level where this item is not part of another cluster

Interface Description

This interface describes a cluster of data points, which fulfill the clustering specification (i.e. 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 given cluster is a node in a tree, children of that node are sub-clusters and leafs of that sub-tree are the noise points.

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

Method Details

getMaxZoom () : {number}

Returns the maximum zoom level where this cluster doesn't fall apart into sub clusters and/or noise poinst

Returns:
 
{number}

getBounds () : {H.geo.Rect}

Returns the bounding rectangle of this cluster.

Returns:
 
{H.geo.Rect}

forEachEntry (callback)

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 analogue example from this class description, method traverses through all nodes of the tree beside the root.

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

forEachDataPoint (callback)

Invokes the specified callback for each data point which is part of this cluster, even indirectly.

In analogue example from this class description, method traverses only through leaf nodes of the tree.

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

getPosition () : {H.geo.Point}

Returns the geographical position of this cluster result.

Returns:
 
{H.geo.Point}

getWeight () : {number}

Returns the weight of this cluster result.

Returns:
 
{number}

isCluster () : {boolean}

To indicate whether this cluster result is a cluster or noise point

Returns:
 
{boolean}

getMinZoom () : {number}

Returns the minimum zoom level where this item is not part of another cluster

Returns:
 
{number}

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.