public RasterImageDownloadCallable(int retries, RasterTile rasterImage) { this.result = new ImageResult(rasterImage); this.retries = retries; String externalUrl = rasterImage.getUrl(); url = dispatcherUrlService.localize(externalUrl); }
protected void renderTile(RasterTile tile, Callback<String, String> callback) { HtmlImage image = htmlImageFactory.create(tile.getUrl(), tile.getBounds(), callback); container.add(image); }
protected void renderTile(RasterTile tile, Callback<String, String> callback) { HtmlImage image = htmlImageFactory.create(tile.getUrl(), tile.getBounds(), callback); container.add(image); }
public Layer createLayer(MapContext mapContext, ClientLayerInfo clientLayerInfo) throws GeomajasException { if (!(clientLayerInfo instanceof TilebasedClientLayerInfo)) { throw new IllegalArgumentException( "TileBasedClientLayerFactory.createLayer() should only be called with TilebasedClientLayerInfo"); } TilebasedClientLayerInfo rasterInfo = (TilebasedClientLayerInfo) clientLayerInfo; RasterLayerRasterizingInfo extraInfo = (RasterLayerRasterizingInfo) rasterInfo .getWidgetInfo(RasterLayerRasterizingInfo.WIDGET_KEY); List<RasterTile> tiles = rasterInfo.getTiles(); for (RasterTile rasterTile : tiles) { if (null != rasterTile.getUrl() && !rasterTile.getUrl().isEmpty()) { rasterTile.setUrl(calculateUrl(rasterTile.getUrl())); } } final RasterLayer layer = configurationService.getRasterLayer(clientLayerInfo.getServerLayerId()); RasterDirectLayer rasterLayer = new RasterDirectLayer(imageThreadPool, getHttpDownloader(layer), tiles, rasterInfo.getTileHeight(), rasterInfo.getTileWidth(), rasterInfo.getScale(), extraInfo.getCssStyle()); rasterLayer.setTitle(clientLayerInfo.getLabel()); rasterLayer.getUserData().put(USERDATA_KEY_LAYER_ID, rasterInfo.getId()); rasterLayer.getUserData().put(USERDATA_KEY_SHOWING, extraInfo.isShowing()); return rasterLayer; }
+ result.getRasterImage().getUrl()); RenderedImage translated = TranslateDescriptor.create(colored, (float) xOffset, (float) yOffset, new InterpolationNearest(), null);