ArcGIS API for JavaScript: Hosted/Remote_Centroid (FeatureServer)
Built using the ArcGIS API for JavaScript