I hope you can help when I hit the wall, I'm also completely unfamiliar with the Google Places APIs.
I will not publish any code yet, as my code works fine when the 2 parts that I am going to describe are executed in isolation.
I use Google Places in addition to the autocomplete API that works with Javascript examples provided by Google.
Initially, I had the following script at the bottom of my document:
<script src="https://maps.googleapis.com/maps/api/js?&libraries=places&callback=initAutocomplete" async defer></script>
and the script at the top of my document:
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
This gave me: "You have enabled the Google Maps API several times on this page, which may cause unexpected errors." therefore, looking at this, I combined them together:
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=initAutocomplete&sensor=false"></script>
However, now that I have done this, I get the following errors:
InvalidValueError: initAutocomplete is not a function TypeError: searchBox is undefined
I donβt get these errors when these scripts are not combined, but after that I realized that the functions that require the Places API stopped working. If I remove the Autocomplete API link, the Places functions will work.
Any ideas on how I can get both of these teams to work together, combining them as shown, and solving the "non-function" problem?
Any suggestions would be very valuable, please let me know if you really need to see the code.
Thanks in advance, Steph