create toggle function with no button
implement map as dual-purpose toggle