ArcGIS API for JavaScript: DynamicBasemapLayers (MapServer)
Built using the ArcGIS API for JavaScript