コード例 #1
0
    /**
     * Creates a new instance of FMapWMSStyle
     *
     * @param name
     * @param title
     * @param styleAbstract
     * @param parent
     */
    public FMapWMSStyle(WMSStyle style, WMSLayerNode parent) {

      this.name = style.getName();
      this.title = style.getTitle();
      this.styleAbstract = style.getAbstract();
      this.legendWidth = style.getLegendURLWidth();
      this.legendHeight = style.getLegendURLHeight();
      this.format = style.getLegendURLFormat();
      this.href = style.getLegendURLOnlineResourceHRef();
      this.type = style.getLegendURLOnlineResourceType();
      this.parent = parent;
    }
コード例 #2
0
 /**
  * Get the styles of the layer returned by the service and generate a list that contains important
  * information of these styles inside our object WMSStyle
  *
  * @param serviceWMSStyles List of styles id
  * @return List of objects WMSSTyle, one by each style id of the parameter serviceWMSStyles
  */
 private List<WMSStyle> createListWMSStyles(ArrayList serviceWMSStyles) {
   List<WMSStyle> styles = new ArrayList<WMSStyle>();
   for (int i = 0; i < serviceWMSStyles.size(); i++) {
     org.gvsig.remoteclient.wms.WMSStyle serviceWMSStyle =
         (org.gvsig.remoteclient.wms.WMSStyle) serviceWMSStyles.get(i);
     WMSStyle sty = new WMSStyle();
     sty.setName(serviceWMSStyle.getName());
     sty.setStyleAbstract(serviceWMSStyle.getAbstract());
     sty.setTitle(serviceWMSStyle.getTitle());
     styles.add(sty);
   }
   return styles;
 }