ArcGIS API for JavaScript: SWAP/SWAP_layers (MapServer)
Built using the
ArcGIS API for JavaScript