Support

Account

Home Forums Front-end Issues How can I use my own Google Map API?

Helping

How can I use my own Google Map API?

  • Hi!

    I’m using a Google Map field and an acf_form(), and I would rather use my own API key when a map is displayed on the front end.

    Also, I have this issue (bug?) where the map field gets stuck and stops working completely after a few seconds. I’m already loading the Google Maps javascript on the header for other maps, so I guessed that it was an issue with loading the Google Maps javascript twice, so I made a conditional statement to stop loading my own instance of the maps javascript on that particular page. But I would like to do it the other way around, and prevent ACF from loading the maps javascript in front end.

    An option in the acf_form() parameters would be super nice, but for now, any ideas on how could I do this?

    Thanks!

  • Hi @unai ,

    Thanks a lot for reaching out to us.

    In order to avoid loading the API’s google map, You may try to exclude the javascript files that you would otherwise include in the template files.

    Let know how it goes.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How can I use my own Google Map API?’ is closed to new replies.