Skip to content

Commit 123934a

Browse files
rochoaRafa de la Torre
authored and
Rafa de la Torre
committed
Pass variables into grid_renderer
Use a similar approach as in EIO_RenderImage, making variables available at renderer/datasource level. It should fix mapnik#768.
1 parent dcd48bb commit 123934a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mapnik_map.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,12 @@ void Map::EIO_RenderGrid(uv_work_t* req)
22432243
attributes.insert(join_field);
22442244
}
22452245

2246-
mapnik::grid_renderer<mapnik::grid> ren(*closure->m->map_,
2246+
mapnik::Map const& map = *closure->m->map_;
2247+
mapnik::request m_req(map.width(),map.height(),map.get_current_extent());
2248+
m_req.set_buffer_size(closure->buffer_size);
2249+
mapnik::grid_renderer<mapnik::grid> ren(map,
2250+
m_req,
2251+
closure->variables,
22472252
*closure->g->get(),
22482253
closure->scale_factor,
22492254
closure->offset_x,

0 commit comments

Comments
 (0)