code: function redisplayRegions(regionMapping, regionIndices) {
    if (defined(regionMapping._regionDetails)) {
      regionMapping.hideImageryLayer();
      setNewRegionImageryLayer(
        regionMapping,
        regionMapping._hadImageryAtLayerIndex,
        regionIndices
      );
      if (regionMapping._catalogItem.isShown) {
        ImageryLayerCatalogItem.showLayer(
          regionMapping._catalogItem,
          regionMapping._imageryLayer
        );
      }
      regionMapping._catalogItem.terria.currentViewer.updateItemForSplitter(
        regionMapping._catalogItem
      );
    }
  }
docs: Update the region imagery layer, eg. when the active variable changes, or the time changes.
  Following previous practice, when the coloring needs to change, the item is hidden, disabled, then re-enabled and re-shown.
  So, a new imagery layer is created (during 'enable') each time its coloring changes.
  It would look less flickery to reuse the existing one, but when I tried, I found the recoloring doesn't get used.
  @private
  @param  {RegionMapping} regionMapping The data source.
  @param  {Array} [regionIndices] Passed into setNewRegionImageryLayer. Saves recalculating it if available.