Marker clustering
Marker clustering is a method that allows all documents on the current map canvas to be represented at once. It is used by Point of Interest layers and Stored Layer sources.
How does it work?
Each time this layer type is re-rendered, the following two queries are used:
-
Firstly, a geo-hash aggregation query is initiated. Based on this query, geo-hashes that have the least number of documents present are selected up to the limit that is configured. These selected geo-hashes are removed and geo-filters are created for these instead.
-
Secondly, a document query is initiated to retrieve individual documents in these areas. Overlapping individual documents will be spiderfied. These can be clicked on and expanded, which can be useful for viewing individual document pop-ups. The configured Map Collar Scale aggregation is used for both queries.
How does it look?
The result is displayed in the following image. The clusters can be distinguished by the numbers 64 and 391. When you hover your cursor over a cluster, the corresponding geo-hash is displayed. Some points on the map display a plus icon, which indicates that they are spiderfied. See the example below, which has a circular arrangement of icons at the bottom: This is how the spiderfy feature looks when it is expanded.
If pop-up fields have been specified in the layer configuration, they appear when a marker that corresponds to one document is hovered over.
For more information about configuring marker clustering, see the sections about Point of Interest layers and Stored Layer configuration.