I do not know if that will work or not, I really don’t know much about the google API.
I can tell you that ACF stores and array in a google maps field.
array( 'address' => '', 'lat' => '', 'lng' => '' )
It is possible that inserting an array with the address and empty lat/lng might cause ACF to do the lookup, but without testing it I don’t know if that will work. Otherwise you would need to get the lat/lng before updating the value.
Outside of both the fields you are already using plus an additional map field I really don’t have any suggestions for you. If you don’t want to use a ACF Gmap field then you’ll need to figure out how to use the google API, which is beyond what I can help you with. I depend on existing plugins to deal with google maps mostly because google documentation is probably the most obtuse documentation I’ve ever read, although the WP guberbug documentations is moving up the charts.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
2022 was a big year for Advanced Custom Fields, with more capabilities, a new generation of ACF Blocks, a refreshed UI, and a new home. Our year in review post looks at advancements we’ve made and offers a glimpse of the future.— Advanced Custom Fields (@wp_acf) January 6, 2023
© 2023 Advanced Custom Fields.