Package chunmap.view.layer

Examples of chunmap.view.layer.VectorLayer


  @Override
  protected void addLayer(MapCtrl map) {
    List<Geometry> geoms = new ArrayList<Geometry>();
    addGeometry(geoms);

    VectorLayer layer = LayerFactory.createGeometryLayer(geoms);
    map.getLayerCollection().add(layer);
  }
View Full Code Here


  }

  @Override
  protected void addLayer(MapCtrl map) {
    String path1="D:\\Temp\\mapdata\\cntry02\\cntry02.shp";
    VectorLayer layer = (VectorLayer) LayerFactory.openShapeFile(path1);
    map.getLayerCollection().add(layer);
   
    VectorLayer grid = new BLGrid().createGrid();
        map.getLayerCollection().add(grid);
  }
View Full Code Here

  protected Layer loadLayerData() {
    String path1=
      "D:\\ChunMap\\ChunMap1.1.1\\Data\\gs\\region.shp";

    VectorLayer layer =  LayerFactory.openShapeFile(path1,1);
    layer.setDefaultStyle(new Symbol[]{new GeneralSymbol(),new LabelSymbol()});
    return layer;
  }
View Full Code Here

    String path2=
        "D:\\Temp\\gs\\city1.shp";
    String path3=
        "D:\\Temp\\gs\\river.shp";

    VectorLayer layer =  LayerFactory.openShapeFile(path1,1);
    layer.setDefaultStyle(new Symbol[]{new GeneralSymbol(),new LabelSymbol()});
    VectorLayer layer2 =  LayerFactory.openShapeFile(path2);
    layer2.setDefaultStyle(new Symbol[]{new GeneralSymbol(Style2D.style2())});
    VectorLayer layer3 =  LayerFactory.openShapeFile(path3);
    layer3.setDefaultStyle(new Symbol[]{new GeneralSymbol(Style2D.style1())});

    map.getLayerCollection().add(layer);
    map.getLayerCollection().add(layer2);
    map.getLayerCollection().add(layer3);
  }
View Full Code Here

    SelectIterator it = new SelectIterator(env);
    List<Layer> layers = map.getLayerCollection().getLayers();
    for (Layer layer : layers) {
      if (layer instanceof VectorLayer) {
        VectorLayer vl = (VectorLayer) layer;
        if (vl.isSelectabel()){
          vl.getFeatures().select(map.getView().getBufferEnvelop(), it);
        }
      }
    }
    finish(it.features);
    onSelectChange.fire(it.features);
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

    public static void changeMapCRS(LayerCollection layers, CoordinateRef target)
    {
      for(Layer layer:layers.getLayers()){
            if (layer instanceof VectorLayer)
            {
                VectorLayer vl = (VectorLayer)layer;
                changeCRS(vl.getFeatures(), target);
            }
        }
        layers.reComputeEnvelop();
    }
View Full Code Here

    SelectIterator it = new SelectIterator(envelop);
    List<Layer> layers = getLayers();
    // Log.log(Logger.Debug, "layer size " + layers.size());
    for (Layer layer : layers) {
      if (layer instanceof VectorLayer) {
        VectorLayer vl = (VectorLayer) layer;
        if (vl.isSelectabel()) {
          vl.getFeatures().select(envelop, it);
        }
      }
    }
    // Log.log(Logger.Debug, "selected feature size " + it.features.size());
    String s = FeatureUtil.LayerHeadString(it.features, envelop).toString();
View Full Code Here

  public VectorLayer createGrid()
    {
        List<Geometry> geometrys = new ArrayList<Geometry>();
        addGeometry(geometrys);

        VectorLayer layer = LayerFactory.createGeometryLayer(geometrys);
        return layer;
    }
View Full Code Here

    SelectIterator it = new SelectIterator(envelop);
    List<Layer> layers = getLayers();
    //Log.log(Logger.Debug, "layer size " + layers.size());
    for (Layer layer : layers) {
      if (layer instanceof VectorLayer) {
        VectorLayer vl = (VectorLayer) layer;
        if (vl.isSelectabel()){
          vl.getFeatures().select(envelop, it);
        }
      }
    }
    //Log.log(Logger.Debug, "selected feature size " + it.features.size());
    List<Feature> fs=it.features;
View Full Code Here

TOP

Related Classes of chunmap.view.layer.VectorLayer

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.