Ejemplo n.º 1
0
 public void addDataLayer(IDataContent datacontent) throws ParseException {
   IImageLayer iil = null;
   if (datacontent instanceof IGeoRaster) {
     iil = new FastImageLayer(root, (IGeoRaster) datacontent);
     root.addLayer(iil);
     root.render(geocontext);
     for (IDataContent vectordatacontent : m_tmplayers) {
       addDataLayer(vectordatacontent);
     }
     m_tmplayers.clear();
   }
   if (datacontent instanceof IVectorData) {
     IVectorData vectordata = (IVectorData) datacontent;
     for (ILayer layer : root.getLayers()) {
       if (layer.isActive()) {
         iil = (IImageLayer) layer;
       }
     }
     if (iil != null) {
       IGeoRaster gir = iil.getImage();
       GeometricLayer layer = GeoUtils.createImageProjectedLayer(vectordata, gir, "EPSG:4326");
       iil.addLayer(new SimpleVectorLayer(vectordata.getName(), iil, vectordata, layer));
     } else {
       m_tmplayers.add(datacontent);
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public void refresh() {
   geocontext.setDirty(true);
   root.render(geocontext);
 }