Simplify location form #179

Open
opened 3 months ago by lino · 5 comments
lino commented 3 months ago
Owner

As a user I want the location form to be in multiple steps, so that i dont't need to read all the possilities first.

if no area or address selected:
show location options:

if an address is selected:
show saved addresses;
show add_addres_form;

if only one ore more areas are selected:
show area_selector;

if all areas are selected:
show text "The services has no focus area an is relevant for the whole city"

location option

  • Single address
    • show add_address_form (generate area from that in the background)
  • Multiple addresses
    • show add_address_form with "+" (generate area from that in the background)
  • Mobile
    • show area_selector
  • Online
    • "Is the service focused on a specific area?"
      • yes: show area selection
      • no: hide area selection and select all?
  • Secret
    • Is it focused on an area?
      • yes: open area_selector
      • no: everything is selected automatically in the background
  • Unknown
    • Dont select anything
    • This is default
    • Is marked as selected in the optiosn list
As a user I want the location form to be in multiple steps, so that i dont't need to read all the possilities first. if no area or address selected: show location options: if an address is selected: show saved addresses; show add_addres_form; if only one ore more areas are selected: show area_selector; if all areas are selected: show text "The services has no focus area an is relevant for the whole city" **location option** - Single address - show add_address_form (generate area from that in the background) - Multiple addresses - show add_address_form with "+" (generate area from that in the background) - Mobile - show area_selector - Online - "Is the service focused on a specific area?" - yes: show area selection - no: hide area selection and select all? - Secret - Is it focused on an area? - yes: open area_selector - no: everything is selected automatically in the background - Unknown - Dont select anything - This is default - Is marked as selected in the optiosn list
lino added this to the Publication milestone 3 months ago
lino added the
feature
label 3 months ago
lino added this to the Development project 3 months ago
Poster
Owner

Future, everything local and configurable

Prepare

  1. Get all the available addesses with gps data from osm and save them in our db. This is an example overpass api call:
[out:json][timeout:205];

area['name'='Berlin']->.berlin;

(
  node["addr:street"](area.berlin);
  way["addr:street"](area.berlin);
  relation["addr:street"](area.berlin);
);

out body;
>;
out skel qt;
  1. Create geojson file with all the areas that should be available. (You can use umap or an other tool.)

  2. Convert the geojson to an svg that could be used as selection input
    mapshaper -i areass.geojson -o areas.svg format=svg svg-data=area

Use

  1. User enters data
  2. We look up address in local db and get gps
  3. We use coordinates and geojson file to check in which area it is. (See https://stackoverflow.com/questions/20776205/point-in-polygon-with-geojson-in-python)

In the filters the created svg could be used for input.

# Future, everything local and configurable **Prepare** 1. Get all the available addesses with gps data from osm and save them in our db. This is an example [overpass](https://overpass-turbo.eu/) api call: ``` [out:json][timeout:205]; area['name'='Berlin']->.berlin; ( node["addr:street"](area.berlin); way["addr:street"](area.berlin); relation["addr:street"](area.berlin); ); out body; >; out skel qt; ``` 2. Create geojson file with all the areas that should be available. (You can use umap or an other tool.) 3. Convert the geojson to an svg that could be used as selection input `mapshaper -i areass.geojson -o areas.svg format=svg svg-data=area` **Use** 1. User enters data 2. We look up address in local db and get gps 3. We use coordinates and geojson file to check in which area it is. (See https://stackoverflow.com/questions/20776205/point-in-polygon-with-geojson-in-python) In the filters the created svg could be used for input.
lino added reference #179-simplify-location-form 3 months ago
overflw modified the milestone from Publication to Puplication Phase-1 3 months ago
Owner

See also #27

See also #27
Poster
Owner

Tested selection functionality with alpinejs on an generated svg.

Tested selection functionality with alpinejs on an generated svg.
Poster
Owner

Changed current location helper scripte to use geojson.

Changed current [location helper scripte](https://codeberg.org/radarini/location-helper) to use geojson.
Poster
Owner

End is in sight. These tasks are still open:

  • style map selector with classes
  • implement clean function when changing type
  • autofill gps field
  • select lor on save (server side)

After that the new selection is usable for the form. It is not suitable for the filters. The further design (different detail levels) can then be worked out in a new issue.

End is in sight. These tasks are still open: - [ ] style map selector with classes - [ ] implement clean function when changing type - [ ] autofill gps field - [ ] select lor on save (server side) After that the new selection is usable for the form. It is not suitable for the filters. The further design (different detail levels) can then be worked out in a new issue.
lino modified the milestone from Puplication Phase-1 to Publication 3 weeks ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: radarini/radarini#179
Loading…
There is no content yet.