ArcGIS API for JavaScript: Hosted/Polylines (FeatureServer)

Built using the ArcGIS API for JavaScript