Add a callback to be invoked when a annotation has been selected or deselected.
the callback to be invoked when a annotation is selected or deselected