}
for (GraphicalSymbol gs : gr.graphicalSymbols()) {
if(gs instanceof ExternalGraphic) {
ExternalGraphic eg = (ExternalGraphic) gs;
Icon icon = null;
if(eg.getInlineContent() != null) {
icon = eg.getInlineContent();
} else {
String location = eg.getLocation().toExternalForm();
// expand embedded cql expression
Expression expanded = ExpressionExtractor.extractCqlExpressions(location);
// if not a literal there is an attribute dependency
if(!(expanded instanceof Literal)) {
estimateAccurate = false;
return;
}
Iterator<ExternalGraphicFactory> it = DynamicSymbolFactoryFinder.getExternalGraphicFactories();
while(it.hasNext() && icon == null) {
try {
ExternalGraphicFactory factory = it.next();
icon = factory.getIcon(null, expanded, eg.getFormat(), imageSize);
} catch(Exception e) {
LOGGER.log(Level.FINE, "Error occurred evaluating external graphic", e);
}
}
}