map switching functionality