decidim icon indicating copy to clipboard operation
decidim copied to clipboard

Add a map to geolocate results

Open NilHomedes opened this issue 1 year ago • 5 comments

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 Image

Mapbox in result page: Image

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

NilHomedes avatar Jul 15 '24 09:07 NilHomedes

@furilo @NilHomedes What do we want to show inside the pin in the map?

This is proposals:

Screenshot 2024-09-18 at 09 19 56

For now, this is a result, showing the title and number of comments:

Screenshot 2024-09-18 at 09 20 13

mllocs avatar Sep 18 '24 07:09 mllocs

@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.

mllocs avatar Sep 18 '24 08:09 mllocs

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 avatar Sep 18 '24 11:09 NilHomedes

@NilHomedes the AC mentions “Geocoding enable” setting but in other places like Proposals or Budgets we use “Maps enabled”.

mllocs avatar Sep 24 '24 07:09 mllocs

@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"

NilHomedes avatar Sep 26 '24 09:09 NilHomedes