Select to view content in your preferred language

Cluster Highlighting Issues

285
0
05-31-2022 02:21 PM
CalebSchwind
New Contributor II

I'm having issues with highlighting features on a FeatureLayer that is clustered. The problem that I am seeing is the highlighting only works if the feature is on the top of the cluster. Below is a link to a codepen that demonstrates the issue. 

When you mouse over items in the list view, on the right, you should see the associated feature on the map be highlighted. With the "Enable Clustering" checkbox on only the graphics on the top of the cluster are highlighted, so if the clustering results in two clusters on the map then the highlighting will only work for two items in the list. With the "Enable Clustering" checkbox off then the highlighting works for all items in the list.

Is there some workaround for this?

I was originally thinking of querying the feature layer to get the cluster graphics and highlight the cluster graphic if it is associated with the feature the user is hovering over. Unfortunately, the `featureLayer.queryFeatures()` and `featureLayerView.queryFeatures()` functions do not return the cluster graphics. Is there some other way that I can just get the clustered graphics?

https://codepen.io/cschwind/pen/gOvXvZJ?editors=1000

0 Kudos
0 Replies