Package org.geomajas.configuration.client

Examples of org.geomajas.configuration.client.ClientRasterLayerInfo


          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()) {
      if (worldPaintable instanceof GfxGeometry) {
View Full Code Here


  public Layer createLayer(MapContext mapContext, ClientLayerInfo clientLayerInfo) throws GeomajasException {
    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();
View Full Code Here

          item.addChild(legendLabel);
          legend.addChild(item);
        }
      } else if (layer instanceof RasterLayer && layer.isShowing()) {
        RasterLayer rasterLayer = (RasterLayer) layer;
        ClientRasterLayerInfo layerInfo = rasterLayer.getLayerInfo();
        LegendItemComponentInfo item = new LegendItemComponentInfo();
        LegendIconComponentInfo icon = new LegendIconComponentInfo();
        icon.setLabel(layerInfo.getLabel());
        icon.setLayerType(layerInfo.getLayerType());
        LabelComponentInfo legendLabel = new LabelComponentInfo();
        legendLabel.setFont(legend.getFont());
        legendLabel.setBackgroundColor("0xFFFFFF");
        legendLabel.setBorderColor("0x000000");
        legendLabel.setFontColor("0x000000");
        legendLabel.setText(layerInfo.getLabel());
        legendLabel.setTextOnly(true);
        item.addChild(icon);
        item.addChild(legendLabel);
        legend.addChild(item);
      }
View Full Code Here

    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(2);
    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.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(2);
    mapRasterizingInfo.setTransparent(true);
    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());
    cl2.setLayerInfo(layerBeansPoint.getLayerInfo());
View Full Code Here

    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(2);
    mapRasterizingInfo.setTransparent(true);
    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());
    cl2.setLayerInfo(layerBeansPoint.getLayerInfo());
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());
    mapContext.getViewport().setScreenArea(new Rectangle(1024, 512));
View Full Code Here

          item.addChild(icon);
          item.addChild(legendLabel);
          legend.addChild(item);
        }
      } else if (layer instanceof ClientRasterLayerInfo) {
        ClientRasterLayerInfo layerInfo = (ClientRasterLayerInfo) layer;
        LegendItemComponentInfo item = new LegendItemComponentInfo();
        LegendIconComponentInfo icon = new LegendIconComponentInfo();
        icon.setLabel(layerInfo.getLabel());
        icon.setLayerType(layerInfo.getLayerType());
        LabelComponentInfo legendLabel = new LabelComponentInfo();
        legendLabel.setFont(legend.getFont());
        legendLabel.setBackgroundColor("0xFFFFFF");
        legendLabel.setBorderColor("0x000000");
        legendLabel.setFontColor("0x000000");
        legendLabel.setText(layerInfo.getLabel());
        legendLabel.setTextOnly(true);
        item.addChild(icon);
        item.addChild(legendLabel);
        legend.addChild(item);
      }
View Full Code Here

          item.addChild(getLegendLabel(legend, title));
          legend.addChild(item);
        }
      } else if (layer instanceof RasterLayer && layer.isShowing()) {
        RasterLayer rasterLayer = (RasterLayer) layer;
        ClientRasterLayerInfo layerInfo = rasterLayer.getLayerInfo();
        LegendItemComponentInfo item = new LegendItemComponentInfo();
        LegendIconComponentInfo icon = new LegendIconComponentInfo();
        icon.setLabel(layerInfo.getLabel());
        icon.setLayerType(layerInfo.getLayerType());
        item.addChild(icon);
        item.addChild(getLegendLabel(legend, layerInfo.getLabel()));
        legend.addChild(item);
      }
    }
    return legend;
  }
View Full Code Here

TOP

Related Classes of org.geomajas.configuration.client.ClientRasterLayerInfo

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.