Support

Account

Home Forums General Issues Google Map Field and HEIGHT Reply To: Google Map Field and HEIGHT

  • I needed this answer, too, so for posterity:
    You need to get the field object:

    $map_object = get_field_object('your_map_field_name');

    That will give you all the field settings. e.g. print_r($map_object):

    Array (
        [key] => field_1234567890
        [label] => Map
        [name] => your_map_field_name
        [_name] => your_map_field_name
        [type] => google_map
        [order_no] => 1
        [instructions] =>
        [required] => 0
        [id] => acf-field-map
        [class] => google_map
        [conditional_logic] => Array (
            [status] => 0
            [rules] => Array (
                [0] => Array (
                    [field] => null
                    [operator] => ==
                )
            )
            [allorany] => all
        )
        [center_lat] =>
        [center_lng] =>
        [zoom] => 12
        [height] => 300 (there it is, yay!)
        [field_group] => 123
        [value] => Array (
            [address] => 123 Main St Anywhere USA
            [lat] => 12.3456789
            [lng] => -123.456789
        )
    )

    ps – just realized this is exactly one year later. weird.