CustomGame.ToggleMap(MapToggleAction mta, params Map[] maps);
Syntax
public void ToggleMap(
    MapToggleAction mta, 
    params Map[] maps
)

mta
Determines if all maps should be enabled, disabled, or neither before toggling.
Type: CustomGameOW.MapToggleAction

maps
Maps that should be toggled.
Type: CustomGameOW.Map

Toggles maps in Overwatch.

Setting CustomGame.EnabledModes and CustomGame.CurrentOverwatchEvent is required for ToggleMap() to work. You can use CustomGame.GetCurrentOverwatchEvent() to get the current Overwatch event.

The code below sets the enabled maps to Route 66, Hanamura, Ilios, and Eichenwalde.

using System;
using CustomGameOW;

...

static void Main(string[] args)
{
    CustomGame cg = new CustomGame();

    // Set enabled modes.
    cg.EnabledModes.Assault = true;
    cg.EnabledModes.AssaultEscort = true;
    cg.EnabledModes.Control = true;
    cg.EnabledModes.Escort = true;

    // Set current Overwatch event.
    cg.CurrentOverwatchEvent = cg.GetCurrentOverwatchEvent();

    // Get Map variable of Route 66, Hanamura, Ilios, and Eichenwalde.
    Map[] mapsToSet = new Map[]
    {
        Map.E_Route66,
        Map.A_Hanamura,
        Map.C_Ilios,
        Map.AE_Eichenwalde
    };

    // Set the maps enabled in custom games to only Route 66, Hanamura, Ilios, and Eichenwalde.
    cg.ToggleMap(MapToggleAction.DisableAll, mapsToSet);
}

See also:

Map tutorial

CustomGame.MapIDFromName()

CustomGame.MapNameFromID()