Package chunmap.view.render

Examples of chunmap.view.render.Style2D


 
  @Test
  public void testAll()
  {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    Style2D style1 = new Style2D();
    style1.setPointSize(10);
    SldWriter writer = new SldWriter(style1, out);
    writer.write();
    String text = out.toString();
   
    //System.out.print(text);
   
    Style2D style = new SldReader().readString(text);
    assertTrue(style.getPointSize() == 10);
  }
View Full Code Here


            map.getLayerCollection().setSelectedLayer(null);
            return;
        }
   
    VectorLayer layer = (VectorLayer) LayerFactory.createFeatureLayer(features);
    Style2D style = new Style2D();
    style.setNeedArea(false);

    final ArrowSymbol symbol = new ArrowSymbol();
   
    style.setPointSize(15);
    style.setLineColor(Color.magenta);
    style.setStroke(new BasicStroke(3));
    style.setPointColor(Color.magenta);

    layer.setDefaultStyle(new Symbol[]{new GeneralSymbol(style),symbol});
    map.getLayerCollection().setSelectedLayer(
        layer);
  }
View Full Code Here

   
    String path1="D:\\Temp\\mapdata\\cntry02\\cntry02.shp";
    VectorLayer layer1 = (VectorLayer) LayerFactory.openShapeFile(path1);
   
    //style
    Style2D style = new Style2D();
    style.setNeedArea(false);
    style.setStroke(new BasicStroke(3));
    layer1.setDefaultStyle(new Symbol[]{new GeneralSymbol(style)});
   
    //reproj
    CoordinateRef target = new CoordinateRef();
        target.setProjection(new Mercator());
View Full Code Here

TOP

Related Classes of chunmap.view.render.Style2D

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.