You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Add the same renderer, but include a new visualVariables property. Set showLegend to false inside the legendOptions property
15
+
1. Create a function that hides cluster information. This is achieved by overriding visualVariables and setting showLegend to false
34
16
35
17
```javascript
36
18
functionhideClusterInformation() {
@@ -53,24 +35,19 @@ function hideClusterInformation() {
53
35
}]
54
36
}
55
37
38
+
layer.featureReduction= featureReductionTemplate;
56
39
}
57
40
```
58
41
59
-
4. Replace the original layer's featureReduction property
60
-
61
-
```javascript
62
-
layer.featureReduction= featureReductionTemplate;
63
-
```
64
-
65
-
5. Wait for layer to finish loading before calling the hideClusterInformation() function
42
+
2. Wait for layer to finish loading before calling the hideClusterInformation() function
66
43
67
44
```javascript
68
45
mapElement.whenLayerView(layer).then(() => {
69
46
hideClusterInformation();
70
47
});
71
48
```
72
49
73
-
6. Add the same function to the toggle button functionality. It is important that you set the layer.featureReduction to clusterConfig before calling the hideClusterInformation() function.
50
+
3. Add the same function to the toggle button functionality. It is important that you set the layer.featureReduction to clusterConfig before calling the hideClusterInformation() function.
0 commit comments