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

Add ecobenefit view for single tree #18

Open
sireliah opened this issue May 9, 2019 · 0 comments
Open

Add ecobenefit view for single tree #18

sireliah opened this issue May 9, 2019 · 0 comments

Comments

@sireliah
Copy link

sireliah commented May 9, 2019

Right now we present ecobenefits for all trees that have trunk diameter.
In the otm-core we use the simplified_tree_benefits function to get benefits from the ecobenefits service. https://github.com/kodujdlapolski/otm-core/blob/devel/opentreemap/treemap/views/tree.py#L123

The data is provided by the ecobenefits service, here in this view: https://github.com/kodujdlapolski/ecobenefits/blob/master/eco/server.py#L54

We would like to add similar functionality, but for a single tree.

  1. User clicks a tree
  2. Otm-core sends a POST request with tree_diam (application/json) to ecobenefits service
  3. Response is parsed in otm-core and rendered to a template

The templates for the ecobenefits are here: https://github.com/kodujdlapolski/otm-core/blob/devel/opentreemap/treemap/templates/treemap/partials/eco_benefits.html

The branch that should be the target for this change is the devel branch.
Please feel free to open Pull Request with changes that you think are necessary.
I'll be happy to answer your questions!

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

No branches or pull requests

1 participant