stop polling when layer is hidden