Feature proposal #8795closed
Redesign location feature to be single input
This should just strictly ask for an address and link that to a map. If map API keys (try to support a few.. e.g. google maps, open maps, etc..) are supplied the map pin icon should expand down a map to select their location and if location api is available the detection location button should use that otherwise use ip address location guessing. If a location is selected on the map AND the location has a name in addition to an address then that also needs to be passed along as a hidden input value. Use localStorage to save their previously used locations so the input can also support autocomplete.
Updated by krileon almost 2 years ago
Location should be stored in a separate database. Database structure as follows.
id | user_id | activity_id | name | address | lat | long
Mapping is restricted to activity so there's no reason to worry about dealing with supporting other objects. Having the activity id stored with it is useful for building activity from locations. Having the user id stored with it is useful for providing autocomplete in the dropdown per-user. Name and Address can both be used for autocomplete lookup. lat/long will be what's actually used for mapping.