Currently in ArcGIS Online if multiple items exist in a single point the template is shown like this
Will I be able to view the details with the number of elements as a part of the template like this
You can retrieve the number of selected features using Popup.featureCount
.
The following CodePen uses this property to provide a dynamic PopupTemplate.title
: https://codepen.io/arnofiva/pen/5b532f8577d097107cf8040da57e0b97
var template = layer.popupTemplate;
var defaultTitle = template.title;
// Compute popup title before it is shown
template.title = function() {
var total = view.popup.featureCount;
if (total > 1) {
return defaultTitle + " - Count: " + total + "";
} else {
return defaultTitle;
}
}
See the following ArcGIS API for JavaScript resources for more information on popups and widgets: