use a closure to save start state of map toggle