Closed magnificode closed 3 years ago
@llexical I've left this issue extremely generic. We will leverage this task to write a utility function that returns lat/long from an address. Further discussions and tasks will need to be created for us to handle this when a user submits a business into Airtable. My assumption is that we will want to eventually go down the road of hooking into the Airtable API in order to create custom forms on the site, in favor of the Airtable embeds.
@magnificode I have been thinking about this. I was wondering if it would be better while we are still dependant on Airtable forms to just collect the address and run a lambda that does the query backend side to update the entry with lat/lng from address which is how we do it for zip codes at the moment.
It wouldn't be too hard and means FE wise all we would need to do is add the extra address fields to the form. If we make sure we still collect the zip code in its own field same as before (which I would advise anyway) then we shouldn't have any downtime or issues with missing lat lng from the data and we can write the backend code to get the location from address when the BE team get around to it.
@llexical does the completion of #297 change your thoughts here at all? Since we will be very soon leveraging the Airtable API to handle custom forms, we can pretty easily trigger a utility function onBlur
of the address field, to return a lat/lng to store in the database.
Most of this functionality is actually handled via the API. If we have a specific need for this utility function we can open a new issue. Closing for now.
User Story
As a developer on the project I want to return latitude and longitude coordinates from a physical address So I can provide data to the RBB API in the correct format
Acceptance Criteria
Is your feature request related to a problem? Please describe.
There are future features in discussion that will require us to ingest a physical address for a business, and convert it into latitude and longitude values for storage in the database. These values could in turn be leveraged to display the business on a map, allow users to "check in" to that business by pinging their current location, etc.
Describe the solution you'd like
A utility function on the front end to leverage the Google Places API (or a cheaper option like MapBox) to ingest a physical address, and return lat/long coordinates for that physical address.