Package org.geomajas.internal.layer.tile

Examples of org.geomajas.internal.layer.tile.InternalTileImpl


    this.textService = textService;
    factory = new GeometryFactory();
  }

  public void writeObject(Object object, GraphicsDocument document, boolean asChild) throws RenderException {
    InternalTileImpl tile = (InternalTileImpl) object;
    FeatureStyleInfo bgStyle = labelStyle.getBackgroundStyle();

    document.writeElement("vml:group", asChild);
    document.writeId("labels." + tile.getCode().toString());
    document.writeAttribute("coordsize", coordWidth + "," + coordHeight);
    document.writeAttribute("style", "WIDTH: " + coordWidth + "; HEIGHT: " + coordHeight);

    // the shapetype
    document.writeElement("vml:shapetype", true);
    document.writeAttribute("id", "labels." + tile.getCode().toString() + ".style");
    document.writeAttribute("style", "WIDTH: 100%; HEIGHT: 100%");
    document.writeAttribute("style", "VISIBILITY: hidden");
    document.writeAttribute("filled", "f");
    document.writeAttribute("stroked", "f");
    document.writeAttribute("coordsize", coordWidth + "," + coordHeight);
    // up to shapetype
    document.closeElement();

    for (InternalFeature f : tile.getFeatures()) {
      InternalFeatureImpl feature = (InternalFeatureImpl) f;
      Coordinate pos = geoService.calcDefaultLabelPosition(feature);
      if (pos == null) {
        continue;
      }
View Full Code Here


  @Autowired
  private DtoConverterService converterService;

  @Test
  public void testToDto() throws GeomajasException {
    InternalTileImpl internalTile = new InternalTileImpl(0, 0, 0, new Envelope(0, 0, 10, 10), 0);
    internalTile.setContentType(VectorTileContentType.STRING_CONTENT);
    VectorTile tile = converterService.toDto(internalTile);
    Assert.assertNotNull(tile);
  }
View Full Code Here

        context.put(PipelineCode.CRS_TRANSFORM_KEY, layerToMap);
        Envelope layerExtent = dtoConverterService.toInternal(layer.getLayerInfo().getMaxExtent());
        Envelope tileExtent = geoService.transform(layerExtent, layerToMap);
        context.put(PipelineCode.TILE_MAX_EXTENT_KEY, tileExtent);
        // can't stop here, we have only prepared the context, not built the tile !
        InternalTile tile = new InternalTileImpl(tileMetadata.getCode(), tileExtent, tileMetadata.getScale());
        tileContainer.setTile(tile);
        securityContextAdder.restoreSecurityContext(rebuildCacheContainer.getContext());

        pipelineService.execute(RasterizingPipelineCode.PIPELINE_GET_VECTOR_TILE_RASTERIZING, layerId, context,
            tileContainer);
View Full Code Here

    CrsTransform layerToMap = geoService.getCrsTransform(layer.getCrs(), crs);
    context.put(PipelineCode.CRS_TRANSFORM_KEY, layerToMap);
    Envelope layerExtent = dtoConverterService.toInternal(layer.getLayerInfo().getMaxExtent());
    Envelope tileExtent = geoService.transform(layerExtent, layerToMap);
    context.put(PipelineCode.TILE_MAX_EXTENT_KEY, tileExtent);
    InternalTile tile = new InternalTileImpl(tileMetadata.getCode(), tileExtent, tileMetadata.getScale());
    GetTileContainer response = new GetTileContainer();
    response.setTile(tile);
    pipelineService.execute(PipelineCode.PIPELINE_GET_VECTOR_TILE, layerId, context, response);
    log.debug("getTile response InternalTile {}", response);
    log.debug("getTile done on layer {}, time {}s", layerId, (System.currentTimeMillis() - ts) / 1000.0);
View Full Code Here

TOP

Related Classes of org.geomajas.internal.layer.tile.InternalTileImpl

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.