Fix RasterTileLayer regression with new VT renderer
@@ -504,12 +504,13 @@ namespace carto {
float tileSize = 256.0f; // 'normalized' tile size in pixels. Not really important
vt::TileId vtTile(tile.getZoom(), tile.getX(), tile.getY());
+ std::shared_ptr<vt::TileBackground> tileBackground = std::make_shared<vt::TileBackground>(vt::Color(), std::shared_ptr<vt::BitmapPattern>());
std::shared_ptr<const vt::TileTransformer::VertexTransformer> vtTransformer = tileTransformer->createTileVertexTransformer(vtTile);
vt::TileLayerBuilder tileLayerBuilder(vtTile, 0, vtTransformer, tileSize, 1.0f); // Note: the size/scale argument is ignored
tileLayerBuilder.addBitmap(tileBitmap);
std::shared_ptr<vt::TileLayer> tileLayer = tileLayerBuilder.buildTileLayer(boost::optional<vt::CompOp>(), vt::FloatFunction(1));
- return std::make_shared<vt::Tile>(vtTile, tileSize, std::shared_ptr<vt::TileBackground>(), std::vector<std::shared_ptr<vt::TileLayer> > { tileLayer });
+ return std::make_shared<vt::Tile>(vtTile, tileSize, tileBackground, std::vector<std::shared_ptr<vt::TileLayer> > { tileLayer });
}
}
