Package org.geomajas.gwt.client.map.layer

Examples of org.geomajas.gwt.client.map.layer.RasterLayer


        double value = 0;
        if (intValue != 0) {
          value = (double) intValue / (double) 100;
        }

        RasterLayer layer = (RasterLayer) map.getMapModel().getLayer("clientLayerOsm");
        if (layer != null) {
          layer.setOpacity(value);
        }
      }
    });
    opacityLayout.addMember(slider);
View Full Code Here


        Set<String> features = vectorLayer.getSelectedFeatures();
        info.setSelectedFeatureIds(features.toArray(new String[features.size()]));
        layerChildren.add(info);
      } else if (layer instanceof RasterLayer && layer.isShowing()) {
        RasterLayerComponentInfo info = new RasterLayerComponentInfo();
        RasterLayer rasterLayer = (RasterLayer) layer;
        info.setLayerId(rasterLayer.getServerLayerId());
        info.setStyle(rasterLayer.getLayerInfo().getStyle());
        layerChildren.add(info);
      }
    }
    map.getChildren().addAll(0, layerChildren);
    return map;
View Full Code Here

          item.addChild(icon);
          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();
View Full Code Here

          LayerTreeLegendItemNode tn = new LayerTreeLegendItemNode(this, vl.getServerLayerId(),
              nsi.getName(), fsi);
          tree.add(tn, this);
        }
      } else {
        RasterLayer rl = (RasterLayer) layer;
        LayerTreeLegendItemNode tn = new LayerTreeLegendItemNode(this, rl.getServerLayerId(),
            LayerIconHelper.getSmallLayerIconUrl(rl));
        tree.add(tn, this);
      }
    }
View Full Code Here

      layerType += " (" + vl.getLayerInfo().getLayerType().name() + ")";
      layerMax = buildScale(vl.getLayerInfo().getMaximumScale());
      layerMin = buildScale(vl.getLayerInfo().getMinimumScale());

    } else {
      RasterLayer rl = (RasterLayer) layer;
      layerType = messages.layerInfoLayerInfoFldLayerTypeRaster();
      layerMax = buildScale(rl.getLayerInfo().getMaximumScale());
      layerMin = buildScale(rl.getLayerInfo().getMinimumScale());
    }

    // ----------------------------------------------------------

    ListGridRecord[] records = new ListGridRecord[5];
View Full Code Here

   *            The group where the object resides in (optional).
   * @param context
   *            A MapContext object, responsible for actual drawing.
   */
  public void paint(Paintable paintable, Object group, MapContext context) {
    RasterLayer layer = (RasterLayer) paintable;

    // Create the needed groups in the correct order:
    context.getRasterContext().drawGroup(mapWidget.getGroup(RenderGroup.RASTER), layer); // layer.getDefaultStyle???

    // Check layer visibility:
    if (layer.isShowing()) {
      context.getRasterContext().unhide(layer);
    } else {
      context.getRasterContext().hide(layer);
    }

View Full Code Here

  }

  private void addLayer(ClientLayerInfo layerInfo) {
    switch (layerInfo.getLayerType()) {
      case RASTER:
        RasterLayer rasterLayer = new RasterLayer(this, (ClientRasterLayerInfo) layerInfo);
        layers.add(rasterLayer);
        break;
      default:
        VectorLayer vectorLayer = new VectorLayer(this, (ClientVectorLayerInfo) layerInfo);
        layers.add(vectorLayer);
View Full Code Here

  public void onClick(Layer<?> layer) {
    if (layer instanceof VectorLayer) {
      VectorLayer vLayer = (VectorLayer) layer;
      vLayer.getFeatureStore().clear();
    } else if (layer instanceof RasterLayer) {
      RasterLayer rLayer = (RasterLayer) layer;
      rLayer.getStore().clear();
    }
    map.render(layer, null, RenderStatus.ALL);
  }
View Full Code Here

    List<PrintComponentInfo> layers = new ArrayList<PrintComponentInfo>();
    // use the normal way for raster layers (TODO: add support for dpi to rasterized part)
    for (Layer layer : mapModel.getLayers()) {
      if (layer instanceof RasterLayer && layer.isShowing()) {
        RasterLayerComponentInfo info = new RasterLayerComponentInfo();
        RasterLayer rasterLayer = (RasterLayer) layer;
        info.setLayerId(rasterLayer.getServerLayerId());
        info.setStyle(rasterLayer.getLayerInfo().getStyle());
        layers.add(info);
      }
    }
    // use the rasterized layers way for vector layers
    for (ClientLayerInfo layerInfo : mapModel.getMapInfo().getLayers()) {
View Full Code Here

          item.addChild(graphic);
          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);
View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.map.layer.RasterLayer

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.