shareish / shareish

Main code of the Shareish platform (backend & frontend)

Home Page:https://shareish.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: allow coordinates in item address

rmaree opened this issue · comments

Some items might need to be created at very precise locations that are not directly linked to an address (as returned by Nominatim). e.g. a gleaning announcement might refer to a cultivated field "in the middle of nowhere" and the closest road/house might be quite far and not guiding well users (so at the end we currently store the coordinates of the closest detected nominatim rather than the precise coordinates that were initially referenced by the user click on the map).
So we should allow copy-paste in the address field of gps coordinates or the use of the precise coordinates from the map when the item is created from the map popup "Choose which type of content you want to add here".
Note however that in many cases, the address identified by Nominatim is still more useful than the coordinates, so we should definitely keep the address by default.
This new feature design might also be brainstormed in parallel with issue #83
We might detect if the typed "address" is text or coordinates, then activate the geosearch in the front-end if it is a textual address ? Or allow the user to choose if they want a text address ? The best design is probably keep the text input field, then do a geosearch based on the text/coordinates with the first autocompleted suggestion = the gps coordinates and the next suggestions being the 5 closest nominatim addresses.
This might have front-end consequences at different places e.g. when we display the location of an item in "item details".

The gps parsing should also be smart, e.g. could be typed by the user as 45°31’49.28″N, 25°59’18.94″E or as decimals 49.530355 25.98859. Convert of a DD°MM'SS.FF coordinate to decimal degrees can be done by computing the value of DD+(MM/60)+(SS.FF/3600), then use a negative sign for West or South. https://www.fcc.gov/media/radio/dms-decimal