Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I load the API into a page asynchronously after the page has loaded?

0
Posted

How can I load the API into a page asynchronously after the page has loaded?

0

Both the Google Maps JavaScript API v2 and v3 can be loaded into a page asynchronously after the page has loaded using the AJAX Common Loader. When using the Common Loader, the API is only loaded when google.load(“maps”, …) is called, which can happen at any time after the Common Loader has loaded. Alternatively the v2 API can be loaded directly from http://maps.google.com/ using the async and callback parameters, as illustrated in this code sample. The v3 API can be loaded asynchronously in the same way, although only the callback parameter is required.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123