Package org.geomajas.sld.GraphicInfo

Examples of org.geomajas.sld.GraphicInfo.ChoiceInfo


  private void convertSymbol(FeatureStyleInfo featureStyleInfo, PointSymbolizerInfo pointInfo) {
    GraphicInfo graphic = pointInfo.getGraphic();
    SymbolInfo symbol = new SymbolInfo();

    if (graphic.getChoiceList().size() > 0) {
      ChoiceInfo choice = graphic.getChoiceList().get(0);
      if (choice.ifExternalGraphic()) {
        ExternalGraphicInfo externalGraphic = choice.getExternalGraphic();
        String href = externalGraphic.getOnlineResource().getHref().getHref();
        ImageInfo image = new ImageInfo();
        image.setHref(href);
        // SLD has no selection concept + no default: what to do ?
        image.setSelectionHref(href);
        image.setHeight((int) Float.parseFloat(getParameterValue(graphic.getSize())));
        symbol.setImage(image);
      } else if (choice.ifMark()) {
        MarkInfo mark = choice.getMark();
        String name = mark.getWellKnownName().getWellKnownName();
        if (name.equalsIgnoreCase("square")) {
          RectInfo rect = new RectInfo();
          rect.setH(Float.parseFloat(getParameterValue(graphic.getSize())));
          rect.setW(Float.parseFloat(getParameterValue(graphic.getSize())));
View Full Code Here

TOP

Related Classes of org.geomajas.sld.GraphicInfo.ChoiceInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.