Package it.eng.spagobi.engines.geo.map.renderer

Examples of it.eng.spagobi.engines.geo.map.renderer.Layer


    if(selectedLayerNames != null) {
      logger.debug("Previous selected layers: " + Arrays.toString( getMapRenderer().getLayerNames() ) );
      getMapRenderer().clearLayers();
      String[] layers = selectedLayerNames.split(",");     
      for(int i = 0; i < layers.length; i++) {       
        Layer layer = getMapRenderer().getLayer(layers[i]);
        if(layer != null) {
          layer.setSelected(true);
        } else {
          layer = new Layer();
          layer.setName(layers[i]);
          layer.setDescription(layers[i]);
          layer.setSelected(true);
          getMapRenderer().addLayer(layer);
        }
      }
      logger.debug("New selected layers: " + Arrays.toString( getMapRenderer().getLayerNames() ) );
    }
View Full Code Here


   * @return the layers
   */
  private static Map getLayers(SourceBean layersConfigurationSB) {
    Map layers;
    List layerList;
    Layer layer;
    Properties attributes;
    String attributeValue;
   
    layers = new HashMap();
   
    layerList = layersConfigurationSB.getAttributeAsList("LAYER");
   
    for(int i = 0; i < layerList.size(); i++) {
      SourceBean layerSB = (SourceBean)layerList.get(i);
     
      layer = new Layer();
     
     
      attributeValue = (String)layerSB.getAttribute("name");
      layer.setName(attributeValue);
      attributeValue = (String)layerSB.getAttribute("description");
      layer.setDescription(attributeValue);
      attributeValue = (String)layerSB.getAttribute("selected");
      if(attributeValue != null){
      layer.setSelected(attributeValue.equalsIgnoreCase("true"));
      }
      else {
        layer.setSelected(false);       
      }
     
      attributeValue = (String)layerSB.getAttribute("default_fill_color");
      layer.setDefaultFillColor(attributeValue);     
     
      layers.put(layer.getName(), layer);     
    }
   
    return layers;
  }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.geo.map.renderer.Layer

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.