0
votes

I'm loading the Google Maps API using jquery $.getScript like so

$.getScript("https://maps.googleapis.com/maps/api/js?async=2&callback=GMapsInit");

You can see that the URL has the callback function GMapsInit. Does the GMapsInit function get called after the script is loaded and executed, or simply after its loaded and not necessarily executed?

1
Do you encounter any issue?A. Wolff
Nope. No issues at alluser3758078

1 Answers

1
votes

The callback is called when the script is loaded AND executed.

This is why you have to use a callback when you load Google Maps.