Package org.geomajas.configuration

Examples of org.geomajas.configuration.LayerInfo


  @Qualifier("beans")
  Layer beansLayer;

  @Test
  public void testGetLayerExtraInfo() {
    LayerInfo layerInfo = new LayerInfo();
    Map<String, LayerExtraInfo> extra = new HashMap<String, LayerExtraInfo>();
    extra.put("one", new ExtraString1("one"));
    extra.put(ExtraString2.class.getName(), new ExtraString2("two"));
    layerInfo.setExtraInfo(extra);

    Assert.assertNotNull(configurationService.getLayerExtraInfo(layerInfo, ExtraString2.class.getName(),
        ExtraString2.class));
    Assert.assertEquals("one",
        configurationService.getLayerExtraInfo(layerInfo, "one", ExtraString1.class).getString());
View Full Code Here


        String layerId = layer.getServerLayerId();
        Layer<?> serverLayer = layerMap.get(layerId);
        if (serverLayer == null) {
          throw new LayerException(ExceptionCode.LAYER_NOT_FOUND, layerId);
        }
        LayerInfo layerInfo = serverLayer.getLayerInfo();
        layer.setLayerInfo(layerInfo);
        layer.setMaxExtent(getClientMaxExtent(map.getCrs(), layer.getCrs(), layerInfo.getMaxExtent(), layerId));
        completeScale(layer.getMaximumScale(), pixPerUnit);
        completeScale(layer.getMinimumScale(), pixPerUnit);
        log.debug("Layer " + layer.getId() + " has scale range : " + layer.getMinimumScale().getPixelPerUnit()
            + "," + layer.getMaximumScale().getPixelPerUnit());
        if (layer instanceof ClientVectorLayerInfo) {
View Full Code Here

    Layer<?> layer = configurationService.getLayer(layerId);
    if (null == layer) {
      log.error("areaCombine on unknown layer " + layerId);
      return null;
    }
    LayerInfo layerInfo = layer.getLayerInfo();

    // base is the max bounds of the layer
    Envelope maxBounds = converterService.toInternal(layerInfo.getMaxExtent());
    PrecisionModel precisionModel = new PrecisionModel(PrecisionModel.FLOATING);
    int srid = geoService.getSridFromCrs(layer.getLayerInfo().getCrs());
    GeometryFactory geometryFactory = new GeometryFactory(precisionModel, srid);
    Geometry geometry = geometryFactory.toGeometry(maxBounds);
View Full Code Here

TOP

Related Classes of org.geomajas.configuration.LayerInfo

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.