public static Img getLargeLayerIcon(Layer<?> layer) {
ExtraLayerInfo eli = WidgetInfoHelper.getClientWidgetInfo(ExtraLayerInfo.IDENTIFIER, ExtraLayerInfo.class,
layer);
if (eli != null) {
return new Img(eli.getLargeLayerIconUrl());
} else {
if (layer instanceof RasterLayer) {
return new Img(LAYER_RASTER_ICON_LARGE_URL);
} else {
switch (((VectorLayer) layer).getLayerInfo().getLayerType()) {
case POINT:
case MULTIPOINT:
return new Img(LAYER_VECTOR_POINT_ICON_LARGE_URL);
case LINESTRING:
case MULTILINESTRING:
return new Img(LAYER_VECTOR_LINE_ICON_LARGE_URL);
case POLYGON:
case MULTIPOLYGON:
return new Img(LAYER_VECTOR_POLYGON_ICON_LARGE_URL);
default:
return new Img(""); // should not happen
}
}
}
}