0

Is there any way to eliminate multiple google maps API calls? On my site it's called from at least 3 different sources, and when it's called multiple times it's crashing all the maps. How you dealt with this issue? Is it possible to block all the calls from every source and just load it once globally for entire website?

  • We need more information. Which map plugin(s) and theme are you using? – cowgill Oct 28 '16 at 1:10
  • @cowgill ACF, progress maps and eventon are my only plugins that might call for API. In ACF I can just not enqueue the script, progress map and EventOn have this option build in. The thing is that there is always some problem with some map when I turn off API call in one of the plugins. Let's say none of them are calling - is it possible to make one API call loading all the necessary libraries to work for all the plugins? If so, how can I do it? – Rafal Oct 28 '16 at 1:23
  • 2
    They all likely enqueue the maps api which causes the conflict. On top of that, they each might require different libraries params (e.g. one needs geometry to work. The other needs places). Have a look at each plugin/theme enqueue and see what they call. I'd probably dequeue them all and enqueue my own custom one with all params combined. – cowgill Oct 28 '16 at 2:05
  • @cowgill How can I enqueue these scripts with libraries to make sure it will work for every component on website, back and frontend as well? – Rafal Oct 28 '16 at 9:55
  • You'd have to look at each one to see how they're doing it. Post the results above and someone could probably help. – cowgill Oct 28 '16 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.