Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass variables to replace tokens in query #248

Merged
merged 5 commits into from
Sep 10, 2017

Conversation

rafatower
Copy link
Contributor

@rafatower rafatower commented Jul 18, 2017

This fixes #218 along with a minor change in node-mapnik

What this does:

  • it optionally adds a new member mapnik::attributes vars to the mvt processor.
  • it is passed by processor::update_tile to the tile_layer, so that it can set the variables of its associated query from there (empty if not passed to the processor constructor).

(thanks @Algunenano for the advice on the constructor)

This is the patch that would be required in node-mapnik to indeed pass the variables to the datasources. I haven't created a PR yet because it makes little sense until this one approved.

@codecov-io
Copy link

codecov-io commented Jul 18, 2017

Codecov Report

Merging #248 into master will increase coverage by 0.69%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
+ Coverage   64.08%   64.77%   +0.69%     
==========================================
  Files          30       30              
  Lines        2230     2308      +78     
==========================================
+ Hits         1429     1495      +66     
- Misses        801      813      +12
Impacted Files Coverage Δ
src/vector_tile_processor.hpp 0% <0%> (ø) ⬆️
src/vector_tile_processor.ipp 74.85% <100%> (+0.14%) ⬆️
src/vector_tile_layer.hpp 86.36% <100%> (-13.64%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da7386a...3dacce9. Read the comment docs.

Rafa de la Torre added 4 commits August 1, 2017 18:41
@springmeyer springmeyer added this to the v1.5.0 milestone Sep 10, 2017
@springmeyer
Copy link
Contributor

Thanks for this @rafatower! Nice work - looks great. Will merge now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mapnik::attributes variables (to replace @tokens in postgis SQL sub-queries)
3 participants