// if the point symbolizer uses an external graphic use it
if ((symbolizer.getGraphic() != null)
&& (symbolizer.getGraphic().getExternalGraphics() != null)
&& (symbolizer.getGraphic().getExternalGraphics().length > 0)) {
ExternalGraphic graphic = symbolizer.getGraphic()
.getExternalGraphics()[0];
try {
if ("file".equals(graphic.getLocation().getProtocol())) {
// it is a local file, reference locally from "styles"
// directory
File file = new File(graphic.getLocation().getFile());
iconHref = RequestUtils.baseURL(mapContext.getRequest()
.getHttpServletRequest())
+ "styles/" + file.getName();
} else if ("http".equals(graphic.getLocation()
.getProtocol())) {
iconHref = graphic.getLocation().toString();
} else {
// TODO: should we check for http:// and use it
// directly?
// other protocols?
}