Skip to content

Commit

Permalink
Pass variables into grid_renderer
Browse files Browse the repository at this point in the history
Use a similar approach as in EIO_RenderImage, making variables
available at renderer/datasource level.

It should fix mapnik#768.
  • Loading branch information
rochoa authored and Rafa de la Torre committed Jan 4, 2018
1 parent dcd48bb commit 123934a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mapnik_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,12 @@ void Map::EIO_RenderGrid(uv_work_t* req)
attributes.insert(join_field);
}

mapnik::grid_renderer<mapnik::grid> 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<mapnik::grid> ren(map,
m_req,
closure->variables,
*closure->g->get(),
closure->scale_factor,
closure->offset_x,
Expand Down

0 comments on commit 123934a

Please sign in to comment.