Package org.geomajas.plugin.rasterizing.command.dto

Examples of org.geomajas.plugin.rasterizing.command.dto.RasterLayerRasterizingInfo


          selectStyle.applyDefaults();
          vectorRasterizingInfo.setSelectionStyle(selectStyle);
        }
        layerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorRasterizingInfo);
      } else if (layer instanceof RasterLayer) {
        RasterLayerRasterizingInfo rasterInfo = new RasterLayerRasterizingInfo();
        ClientRasterLayerInfo layerInfo = (ClientRasterLayerInfo) layer.getLayerInfo();
        rasterInfo.setShowing(layer.isShowing());
        rasterInfo.setCssStyle(layerInfo.getStyle());
        layerInfo.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rasterInfo);
      }
    }
    mapRasterizingInfo.getExtraLayers().clear();
    for (WorldPaintable worldPaintable : map.getWorldPaintables().values()) {
View Full Code Here


    if (!(clientLayerInfo instanceof ClientRasterLayerInfo)) {
      throw new IllegalStateException(
          "RasterLayerFactory.createLayer() should only be called using ClientRasterLayerInfo");
    }
    ClientRasterLayerInfo rasterInfo = (ClientRasterLayerInfo) clientLayerInfo;
    RasterLayerRasterizingInfo extraInfo = (RasterLayerRasterizingInfo) rasterInfo
        .getWidgetInfo(RasterLayerRasterizingInfo.WIDGET_KEY);
    ReferencedEnvelope areaOfInterest = mapContext.getAreaOfInterest();
    RasterLayer layer = configurationService.getRasterLayer(clientLayerInfo.getServerLayerId());
    MapViewport port = mapContext.getViewport();
    double rasterScale = port.getScreenArea().getWidth() / port.getBounds().getWidth();
    List<RasterTile> tiles = rasterLayerService.getTiles(clientLayerInfo.getServerLayerId(),
        areaOfInterest.getCoordinateReferenceSystem(), areaOfInterest, rasterScale);
    RasterDirectLayer rasterLayer = new RasterDirectLayer(tiles, layer.getLayerInfo().getTileWidth(), layer
        .getLayerInfo().getTileHeight(), extraInfo.getCssStyle());
    rasterLayer.setTitle(clientLayerInfo.getLabel());
    rasterLayer.getUserData().put(USERDATA_KEY_SHOWING, extraInfo.isShowing());
    return rasterLayer;
  }
View Full Code Here

        if (layer instanceof VectorLayer) {
          VectorLayerRasterizingInfo vectorInfo = (VectorLayerRasterizingInfo) layer.getLayerInfo()
              .getWidgetInfo().get(VectorLayerRasterizingInfo.WIDGET_KEY);
          vectorInfo.setShowing(true);
        } else if (layer instanceof RasterLayer) {
          RasterLayerRasterizingInfo rasterInfo = (RasterLayerRasterizingInfo) layer.getLayerInfo()
              .getWidgetInfo().get(RasterLayerRasterizingInfo.WIDGET_KEY);
          rasterInfo.setShowing(true);
        }
      }
    }
    imageUrlService.createImageUrl(mapWidget, new ImageUrlCallback() {
View Full Code Here

    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

    ClientRasterLayerInfo cl1 = new ClientRasterLayerInfo();
    cl1.setServerLayerId(layerBluemarble.getId());
    RasterLayerRasterizingInfo rr1 = new RasterLayerRasterizingInfo();
    rr1.setCssStyle("opacity:0.5");
    cl1.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rr1);
    mapInfo.getLayers().add(cl1);
    new MapAssert(mapInfo).assertEqualImage("oneraster.png", writeImages, DELTA);
  }
View Full Code Here

    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

    ClientRasterLayerInfo cl1 = new ClientRasterLayerInfo();
    cl1.setServerLayerId(layerBluemarble.getId());
    cl1.setLabel("Blue Marble");
    RasterLayerRasterizingInfo rr1 = new RasterLayerRasterizingInfo();
    rr1.setCssStyle("opacity:0.5");
    cl1.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rr1);
    mapInfo.getLayers().add(cl1);

    ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
    cl2.setServerLayerId(layerBeansPoint.getId());
View Full Code Here

    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

    ClientRasterLayerInfo cl1 = new ClientRasterLayerInfo();
    cl1.setServerLayerId(layerBluemarble.getId());
    cl1.setLabel("Blue Marble");
    RasterLayerRasterizingInfo rr1 = new RasterLayerRasterizingInfo();
    rr1.setCssStyle("opacity:0.5");
    cl1.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rr1);
    mapInfo.getLayers().add(cl1);

    ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
    cl2.setServerLayerId(layerBeansPoint.getId());
View Full Code Here

  @Test
  public void testWMS() throws Exception {

    ClientRasterLayerInfo cl1 = new ClientRasterLayerInfo();
    cl1.setServerLayerId(layerBluemarble.getId());
    RasterLayerRasterizingInfo rr1 = new RasterLayerRasterizingInfo();
    rr1.setCssStyle("opacity:0.75");
    cl1.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rr1);

    DefaultMapContext mapContext = new DefaultMapContext();
    mapContext.setCoordinateReferenceSystem(layerBluemarble.getCrs());
    mapContext.getViewport().setCoordinateReferenceSystem(mapContext.getCoordinateReferenceSystem());
View Full Code Here

    }
    // use the rasterized layers way for vector layers
    for (ClientLayerInfo layerInfo : mapModel.getMapInfo().getLayers()) {
      // we must skip the raster layers or we have them twice !
      if (layerInfo instanceof ClientRasterLayerInfo) {
        RasterLayerRasterizingInfo rInfo = (RasterLayerRasterizingInfo) layerInfo
            .getWidgetInfo(RasterLayerRasterizingInfo.WIDGET_KEY);
        rInfo.setShowing(false);
      }
    }
    RasterizedLayersComponentInfo rasterizedLayersComponentInfo = new RasterizedLayersComponentInfo();
    rasterizedLayersComponentInfo.setMapInfo(mapModel.getMapInfo());
    layers.add(rasterizedLayersComponentInfo);
View Full Code Here

TOP

Related Classes of org.geomajas.plugin.rasterizing.command.dto.RasterLayerRasterizingInfo

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.