OlhenShu / GreenCityProjectStage

0 stars 0 forks source link

Filtering places by distance from user #225

Open OlhenShu opened 11 months ago

OlhenShu commented 11 months ago

As an unregistered user I want to filter places in the sidebar list by distance form me so that I can narrow down my search.

Acceptance criteria:

  1. WHEN an unregistered user access an application popup with access or block location.

  2. If Unregistered user allows access to his location for an application, THEN system defines location of user automatically and display marker of user location on the map.

  3. Unregistered user can put location marker on the map.

  4. If unregistered user does not put marker on the map, system shall calculate distances to places from default marker.

  5. Marker of location shall be different than marker of place. (For example blue colored).

  6. "Filter by" button in available above the sidebar list with places for Unregistered user.

  7. WHEN an unregistered user clicks "Filter by" button, THEN panel with filtering options is opened.

  8. Panel with filtering contains third option "In radius from you" that have input field (number type) with placeholder "km" and next regex: a. Value shall be positive; b. Max value shall be 500 km

  9. "Apply" and "Cancel" button shall be displayed on the bottom of filtering panel.

  10. WHEN an unregistered user set highest value of distance AND click "Apply" button, THEN system shall: a. display places in the sidebar list and on the map, which are in defined radius from current user location/ putted marker by user/ default marker location. (For example, when an unregistered user fill in a value as 5 km, then system shall display places in the sidebar list, which are in radius 5 km) b. display circle as filtered radius from marker of user location/default location; c. filtered places shall be visible inside of circle

  11. An unregistered user can click "Cancel" button on the filtering panel.

  12. WHEN an unregistered user fills in highest value and clicks "Cancel" button, THEN filter shall not be applied.

  13. WHEN an unregistered user applied filter by distance and clicks "Cancel" button, THEN system shall display all available places on the map.

  14. WHEN unregistered user applied filter by distance and then zoom in/out the map, system shall hold filtered result AND shows nothing else.

This user story relates to #232