Emit toggle event when visibility of layer is changed