Do this for the if statements
if (Input.GetButtonDown("Mapswitch") && map2active == false && map1active == true)
{
map1.SetActive(false);
map2.SetActive(true);
//new code
map1active = false;
map2active = true;
}
else if (Input.GetButtonDown("Mapswitch") && map2active == true && map1active == false)
{
map1.SetActive(true);
map2.SetActive(false);
//new code
map1active = true;
map2active = false;
}