Use this class if you have HTML items that need to be displayed at specific geo coordinates on the map
and cluster based on the zoom level.
You need to subclass this class. Then use it as a react component
inside DeckGL
.
For example code see Unesco World Heritage.
Override to provide an array of Objects
that need clustering.
If the items have not changed please provide the same array to avoid
regeneration of the cluster which causes performance issues.
Override to provide coordinates for each object of getAllObjects(). Return array of two numbers.
Override to return an HtmlOverlayItem
for the single object
at coordinates
.
Override to return an HtmlOverlayItem for the cluster
at coordinates
.
pointCount
is the number of objects that are represented by that cluster.
Use getClusterObjects(clusterId)
to get cluster contents.
Returns an array of objects.
Override to return options used when instantiating the overlay and thus the underlying supercluster object.