@@ -12,16 +12,18 @@ Clustered points have four properties;
12
12
- ` point_count ` - The number of points the cluster contains.
13
13
- ` point_count_abbreviated ` - A string that abbreviates the point_count value if it is long. (i.e. 4,000 becomes 4K)
14
14
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
+
15
17
You can observe the clusters by zooming in and out on the map.
16
18
17
19
<ClusterAggregates showBubbles showNumbers />
18
20
19
21
In 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 .
21
23
22
24
<Source code = { `
23
25
const 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.
25
27
radius: [
26
28
'step',
27
29
['get', 'point_count'],
@@ -47,7 +49,7 @@ const bubbleLayerOptions = {
47
49
};
48
50
` } />
49
51
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.
51
53
52
54
<Source code = { `
53
55
const symbolLayerOptions = {
@@ -71,11 +73,11 @@ import {
71
73
AzureMapsProvider,
72
74
} from 'react-azure-maps';
73
75
74
- const ClusterAggregates = ({ showBubbles, showNumbers }: ClusterAggregatesProps ) => {
76
+ const ClusterAggregates = () => {
75
77
76
78
return (
77
79
<AzureMapsProvider>
78
- <AzureMap options={your_option }>
80
+ <AzureMap options={...your_options, center: [-97, 39], zoom: 1.5, view: 'Auto', }>
79
81
<AzureMapDataSourceProvider
80
82
id="ClusterAggregates DataSourceProvider"
81
83
dataFromUrl="https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson"
0 commit comments