i havent tried this but this may work.
Make a function which takes in the
button reference and then save the
reference to map with the state and
save the map. and for retrieving the
state make a function that takes the
button reference and then just get the
state.
I would have to reference all the button which count the same as the checkbox. Nonetheless, I will try this and get back.