Add a map to geolocate results
Is your feature request related to a problem? Please describe. Mos of the times results comes from proposals or projects that are geolocated. Right now, I can not link results to an address and display it in a map, as it happens in proposals. This would help participants to browse within the accountability component.
Describe the solution you'd like As an admin, I want a feature that allows me to enable geocodification in the accountability component, so I can define an address for each result. Then, a map with the results geolocated should be displayed in the front-end.
This issue should include:
- Add new “Geocoding enable” setting checkbox in the Accountability component
- A new “Address” field should be added in the result form, as it works in proposals.
- The map should be displayed in the landing page and the results should be pin, as in proposals.
- When results are created by importing proposals, then the address should also be imported.
- Show the map box with the address in the result page
Mockup
Mapbox in result page:
Does this issue could impact on users private data? No
Acceptance criteria
- [x] Given I’m an admin When I configure an accountability component Then I should be able to mark the “Maps enabled” checkbox
- [x] Given I’m an admin When “Maps enabled” is marked in the accountability component Then I should be able to define an address in each result
- [x] Given I’m a participant When maps is enabled, and I access to the landing accountability component Then I should see a map with the results pinned
- [x] Given I’m a participant When I click on a result pinned in the map Then a tooltip should be displayed and I can click to access to that result
- [x] Given I’m a participant When I access to a result with an adress defined Then I should see the map-box
@furilo @NilHomedes What do we want to show inside the pin in the map?
This is proposals:
For now, this is a result, showing the title and number of comments:
@NilHomedes Regarding this AC:
Given I’m an admin When I import proposals to results Then the proposal’s address should be imported to the result.
Can't be done until https://github.com/decidim/decidim/issues/13116 is done.
However, results can be imported from Budgets, which also support geolocation. I can implement it for Budgets in this issue and move that AC to #13116.
Hello @mllocs !
What do we want to show inside the pin in the map?
We should show the tittle and below the progress percentage.
However, results can be imported from Budgets, which also support geolocation. I can implement it for Budgets in this issue and move that AC to https://github.com/decidim/decidim/issues/13116.
You are right. Let's do this. Could you move this AC to https://github.com/decidim/decidim/issues/13116, then?
@NilHomedes the AC mentions “Geocoding enable” setting but in other places like Proposals or Budgets we use “Maps enabled”.
@NilHomedes the AC mentions “Geocoding enable” setting but in other places like Proposals or Budgets we use “Maps enabled”.
You're right. Let's define it as "Maps enabled"