Support

Account

Home Forums Backend Issues (wp-admin) Disabling the google map

Unread

Disabling the google map

  • I’m looking to integrate a repeater in which Google Map fields can be added. What I’m looking to build is a map in which multiple anchors can be placed. This could possibly build up to 50 to 100 markers.

    The thing is that I’m not fully aware if ACF is possible to scale something like this. If a page needs to load 100 Google Map fields, wouldn’t it take a shit load of time to calculate all the anchors?

    So, what I’m looking to do is hooking into the field that creates this Google Map. I’m using the following code, but I could only find a work-around (basically adjusting the height of the field to 0.1 pixels).

      function my_acf_prepare_field( $field ) {
        if (!empty($field)) $field["height"] = .1;
        return $field;
      }
    
      add_filter('acf/prepare_field/type=google_map', 'my_acf_prepare_field');

    This (visually) does the trick, yet not technically. Does anybody know a more solid workaround?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.