Now it should be clear that the map's changelayer event is triggered whenever the layer's actual visibility (i.e. visible to the user) changes.
Now it should be clear that the map's changelayer event is triggered whenever the layer's actual visibility (i.e. visible to the user) changes.