added selectMap to functions so right map is open.