Oracle APEX Map and Clusters #JoelKallmanDay

Clusters in the Map region of Oracle APEX allow you to group nearby map points, which helps to maintain a cleaner and more organized map. This built-in feature is often overlooked by users. Clustering is particularly useful when displaying a large number of points. In this article, I will provide a quick overview of how to use the clustering feature in Oracle APEX and the available configuration options.

Data

For demonstration purposes, I will use the dataset previously described here. My map looks like this:

Points Clustering

💡
The clusters option is only available for the point layer.

To enable clusters, go to the Points Clustering section and set the Enable option to true. Next, fill in the following parameters:

  • Clustering Radius – If a value of 80 is specified, points within 80 pixels of each other will be grouped into a cluster. (Type: Integer; Minimum Value: 10)

  • Shape (required) – SVG shape used to represent a point cluster. (Type: Text; Supported Substitutions: Application, Page Items, and System Variables)

  • Fill Color – Color used to fill the point cluster shape. (Type: Color)

  • Shape Scale – Scaling factor for the SVG shape of the point cluster. (Type: Text; Maximum value: 10; Supported Substitutions: Application, Page Items, and System Variables)

  • Tooltip – HTML expressions to be shown as a tooltip. You can use the placeholders &LAYER. and &COUNT. to reference the layer name and the number of map objects in the cluster. (Type: HTML; Supported Substitutions: Application, Page Items, and System Variables; Supports Client-side Template Directives)

After setting these parameters:

My map looks like this:

Conclusions

Oracle APEX makes it easy to use the Points Clustering feature for maps by simplifying it to just five basic parameters, eliminating the need for complex JavaScript code. This built-in functionality offers a straightforward way to manage map data with minimal effort.