Select to view content in your preferred language

cluster popup

967
2
Jump to solution
08-17-2022 04:18 AM
EliyahoLevi
Occasional Contributor

Hi,
I'm trying to do cluster point popup with my own actions, 
I took an example from https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/summarize-and-explore-point-clusters...

sample code - https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=featurereduction-cluster...  

and its works fine, but, I want to do my own browse feature action,
it appears to make 2 buttons/actions of the browse feature, how do i cancel the default  browse feature, or how to discard the cluster summery from the results?

EliyahoLevi_0-1660653226774.png

 

thank you.

 

0 Kudos
1 Solution

Accepted Solutions
KristianEkenes
Esri Regular Contributor

Hi, 

If you set popupTemplate.overwriteActions = true, it will overwrite the browse features and zoomTo actions in the cluster popup.

To remove the cluster summary popup, you can set the popup.features property to only the clustered features once they're queried. 

query.aggregateIds = [ clusterGraphic.getObjectId() ];
const { features } = await layerView.queryFeatures(query);
view.popup.features = features;

 

View solution in original post

2 Replies
KristianEkenes
Esri Regular Contributor

Hi, 

If you set popupTemplate.overwriteActions = true, it will overwrite the browse features and zoomTo actions in the cluster popup.

To remove the cluster summary popup, you can set the popup.features property to only the clustered features once they're queried. 

query.aggregateIds = [ clusterGraphic.getObjectId() ];
const { features } = await layerView.queryFeatures(query);
view.popup.features = features;

 

EliyahoLevi
Occasional Contributor

Thank you!

0 Kudos