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 committed May 16, 2017
1 parent c335992 commit 0f64ee5
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 0f64ee5

Please sign in to comment.