ArcGIS API for JavaScript: SharedServices/ViewerLayers (MapServer)

Built using the ArcGIS API for JavaScript