SymbolInfo info = featureStyle.getSymbol();
if (info.getImage() != null) {
return styleBuilder.createExternalGraphic(getURL(info.getImage().getHref()),
getFormat(info.getImage().getHref()));
} else {
Mark mark = null;
if (info.getRect() != null) {
// TODO: do rectangles by adding custom factory ?
mark = styleBuilder.createMark("square");
mark.setSize(styleBuilder.literalExpression((int) info.getRect().getW()));
} else if (info.getCircle() != null) {
mark = styleBuilder.createMark("circle");
mark.setSize(styleBuilder.literalExpression(2 * (int) info.getCircle().getR()));
}
mark.setFill(createFill(featureStyle));
mark.setStroke(createStroke(featureStyle));
return mark;
}
}