I am getting started with the Google autocomplete API where the following code is included in the script tag. However, the callback function initAutocomplete is inside a module and I am not able to call it.
<script src="https://maps.googleapis.com/maps/api/js?key=APIKEYGOESHERE&libraries=places&callback=initAutocomplete" async defer></script>
Could someone kindly advise on the best approach for this? Alternatively, how would I format the contents of the script tag to sit inside a js module?
Thanks in advance!