function updateMosaic(ids, mapPanel) {
  if (ids.length === 0) {
    mapPanel.layers().set(0, ee.Image());
    return;
  }
  var mosaickedImage = ee.ImageCollection(ids).median();
  mapPanel.layers().set(0, mosaickedImage.visualize(VIZ_PARAMS));
}
Recomputes a mosaic with the supplied IDs and adds it to the mapPanel.