Open pjmuller opened 3 months ago
That would be a good enhancement, yes.
Hi @adrianthedev , Is there any update on this?
It would be great to have a field-type where:
A bit like this in Monday.com: https://support.monday.com/hc/en-us/articles/360001144325-The-Location-Column Or this in Asana: https://asana.com/nl/apps/taskmap
I see two things here with this enrichment.
The first one could be a field, yes. Possibly a custom field that's shown only on forms
For the second item, where would you see this information beings stored? on the record for each individual property, or fetch it from the API everytime to do what?
Hi @adrianthedev ,
before_save
hook for exampleFor 1. I meant get the coordinates from the API after the user inputs a human-readable address.
But we could simplify it by getting the human -readable address from the user, fetching the data from the API and then just passing that to the record. You could pick it up using a setter on the model or how you proposed using a before_save
hook.
@adrianthedev is all then clear regarding the feature request? What I did not see you mentioning is the autocomplete part which is definitely a big plus (e.g. https://www.mapbox.com/address-autofill#:~:text=Try%20out%20the%20Address%20Autofill%20Demo )
I don't know if we have everything we need about this request. I'm re-reading the original post and can't visualise a flow.
@adrianthedev , apologies for the late reply I'm "holiday" with my 3 kids at home, exhaustion is around the corner ;p.
here's my answer: https://www.loom.com/share/7ee368e1d6e34dad8eab0143dfbab6cd (demo = https://www.mapbox.com/address-autofill#:~:text=Try%20out%20the%20Address%20Autofill%20Demo ) Does this make more sense now?
PS: if you don't want to use the mapbox component (or logic) you could also go for the 80/20 approach that when the address is not recognized by the autocomplete that you store the full string in the _address
input and leave all other attributes empty
Feature
The location field type it returns the latitude and longitude as a string (e.g.
44.427946,26.102451
).However as it connects to mapbox API there are a lot more relevant data attributes at our disposal. For us it would be interesting to receive a hash with things like
Current workarounds
Not aware of any hacks to get this data