Watching for imagery changes

If the imagery layer is being changed from the BaseLayerPicker widget, you can subscribe to BaseLayerPickerViewModel.selectedImagery to receive notifications when it is changed. Here is a code example:

Cesium.subscribeAndEvaluate(viewer.baseLayerPicker.viewModel, ‘selectedImagery’, function(newValue) {

console.log(newValue.name);

});

Here, newValue is a ProviderViewModel.

Is that what you are looking for?

-Hannah