Hi, i tried to add text field id "street_address" and "geometry"
but it does not auto populate data
please give me php code to auto populate data
Just like the gif image demo:
https://i1.wp.com/metabox.io/wp-content/uploads/2016/03/meta-box-geolocation.gif
in
https://docs.metabox.io/extensions/meta-box-geolocation/#address-field
my php code below not working to auto populate:
$meta_boxes[] = [
'title' => __( 'Google Map', 'pmbds' ),
'id' => 'geometry',
'post_types' => ['properties'],
'context' => 'after_title',
'geo' => [
'api_key' => 'xxxxxxxx',
=> 'vn'
],
],
'fields' => [
[
'name' => __( 'address search', 'pmbds' ),
'id' => $prefix . 'address_map',
'type' => 'text',
],
[
'name' => __( 'lat', 'aaaa' ),
'id' => $prefix . 'lat',
'type' => 'text',
'columns' => 12,
],
[
'name' => __( 'street_address', 'aaaa' ),
'id' => 'street_address',
'type' => 'text',
'columns' => 12,
],
[
'name' => __( 'geometry', 'aaa' ),
'id' => $prefix . 'geometry',
'type' => 'text',
'columns' => 12,
],
[
'name' => __( 'google map', 'aaa' ),
'id' => $prefix . 'map_g',
'type' => 'map',
'api_key' => 'xxxxxx',
'address_field' => 'address_map',
'binding' => 'geometry',
'zoom' => 14,
'columns' => 12,
],
],
];