@@ -12,16 +12,18 @@ Clustered points have four properties;
1212- ` point_count ` - The number of points the cluster contains.
1313- ` point_count_abbreviated ` - A string that abbreviates the point_count value if it is long. (i.e. 4,000 becomes 4K)
1414
15+ For more information on clustering, see the tutorial [ here] ( https://learn.microsoft.com/en-us/azure/azure-maps/clustering-point-data-web-sdk ) .
16+
1517You can observe the clusters by zooming in and out on the map.
1618
1719<ClusterAggregates showBubbles showNumbers />
1820
1921In this example, we use a ** Bubble Layer** to render the clusters as circles and a ** Symbol Layer** to render the number of points in each cluster.
20- For the bubble layer, we set the radius and the color to change based on the number of points in the cluster .
22+ For the bubble layer, we set the radius and the color to change based on the numbers of points in the clusters .
2123
2224<Source code = { `
2325const bubbleLayerOptions = {
24- //Scale the size of the clustered bubble based on the number of points inthe cluster.
26+ //Scale the size of the clustered bubble based on the number of points in the cluster.
2527 radius: [
2628 'step',
2729 ['get', 'point_count'],
@@ -47,7 +49,7 @@ const bubbleLayerOptions = {
4749};
4850` } />
4951
50- For the symbol layer, we set the text to be the point_count_abbreviated property of the cluster.
52+ For the symbol layer, we set the text to be the ` point_count_abbreviated ` property of the cluster.
5153
5254<Source code = { `
5355const symbolLayerOptions = {
@@ -71,11 +73,11 @@ import {
7173 AzureMapsProvider,
7274} from 'react-azure-maps';
7375
74- const ClusterAggregates = ({ showBubbles, showNumbers }: ClusterAggregatesProps ) => {
76+ const ClusterAggregates = () => {
7577
7678 return (
7779 <AzureMapsProvider>
78- <AzureMap options={your_option }>
80+ <AzureMap options={...your_options, center: [-97, 39], zoom: 1.5, view: 'Auto', }>
7981 <AzureMapDataSourceProvider
8082 id="ClusterAggregates DataSourceProvider"
8183 dataFromUrl="https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson"
0 commit comments