Hi,
I have a Google Map field type and I want to dynamically populate the Lat & Lng values with data from two other fields I have in the group.
These two fields are values being read in from an external API.
I have attached two screenshots, is this possible?
Thanks
https://www.advancedcustomfields.com/resources/acf-prepare_field/
add_filter('acf/prepare_field/name=map', 'my_prepare_map_field');
function my_prepare_map_field($field) {
$field['center_lat'] = get_field('latitude', $post_id);
$field['center_lng'] = get_field('longitude', $post_id);
return $field;
}