// check the additional options before proceeding
cmapLegendBuilder.checkAdditionalOptions();
// instantiate the creator
ColorMapLegendCreator cMapLegendCreator = cmapLegendBuilder.create();
return new BufferedImageLegendGraphic(cMapLegendCreator.getLegend());
}
throw new RuntimeException("Unable to create a legend due to missing colorMap");
} catch (IOException e) {
throw new RuntimeException(e);
} catch (ParseException e) {