function makeThumbnail(id, onChangeFunc) {
  var thumbnailContainer = ui.Panel({
    layout: ui.Panel.Layout.flow('vertical'),
    style: {
      backgroundColor: colors.transparent,
      border: BORDER_STYLE,
      padding: '4px',
      margin: '5px',
    },
  });

  // Add an image label to the thumbnail container.
  var idPieces = id.split('/');
  var shortImageId = idPieces[idPieces.length - 1];
  var imageLabel = ui.Label(shortImageId, LABEL_STYLE);
  thumbnailContainer.add(imageLabel);

  // Add the thumbnail itself to the container.
  var thumbnail = ui.Thumbnail({
    image: ee.Image(id).visualize(VIZ_PARAMS),
    params: {dimensions: THUMBNAIL_WIDTH, crs: 'EPSG:3857', format: 'jpg'},
    style: {
      width: THUMBNAIL_WIDTH + 'px',
      maxHeight: THUMBNAIL_WIDTH + 25 + 'px',
      backgroundColor: colors.transparent,
    }
  });
  thumbnailContainer.add(thumbnail);

  // Add the checkbox to specify which thumbnails to include in the mosaic.
  var checkbox = ui.Checkbox('Include', true, onChangeFunc, false, LABEL_STYLE);
  thumbnailContainer.add(checkbox);

  return thumbnailContainer;
}
Return a panel containing the thumbnail and label for an image with
the given ID and geometry.
@param {string} id The id of the image from which to make the thumbnail.
@param {Function} onChangeFunc The function to call when thumbnail is checked/unchecked.