All, I want to detect user layer selection in order to synchronize my sidebar with the displayed layers.
But I don't see any layer control events in the API reference; How might I tell when such user layer selection has occurred?
As an alternative, I've looked at the layer load and unload events, but I don't see any identification in what's returned. Did I miss that somehow?
There is a "baselayerchange' event defined here http://leafletjs.com/reference.html#control-layers Just bind it to the map object and you are good to go.
map.on('baselayerchange', function(e) {
console.log(e);
});