From 0f64ee511c9edefda973092798513410eb7840b6 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Tue, 16 May 2017 16:12:38 +0200 Subject: [PATCH] Pass variables into grid_renderer Use a similar approach as in EIO_RenderImage, making variables available at renderer/datasource level. It should fix #768. --- src/mapnik_map.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mapnik_map.cpp b/src/mapnik_map.cpp index d92cb5fd5e..b3e81ed66b 100644 --- a/src/mapnik_map.cpp +++ b/src/mapnik_map.cpp @@ -2243,7 +2243,12 @@ void Map::EIO_RenderGrid(uv_work_t* req) attributes.insert(join_field); } - mapnik::grid_renderer ren(*closure->m->map_, + mapnik::Map const& map = *closure->m->map_; + mapnik::request m_req(map.width(),map.height(),map.get_current_extent()); + m_req.set_buffer_size(closure->buffer_size); + mapnik::grid_renderer ren(map, + m_req, + closure->variables, *closure->g->get(), closure->scale_factor, closure->offset_x,