Referencing Google Map Scripts
-
Hi – having a few problems trying to get Google’s Place API auto address complete to play nice with debloat.
Understand the method for excluding a script when it’s sitting on the server itself, is there a different form for offsite scripts that are performing callbacks such as https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap
In my case for Google Address autocomplete, getting debloat to ignore these:
1)
<script type="text/javascript" src="https://myserver.com/wp-content/plugins/fc-google-address-autocomplete/js/google-address-autocomplete-118.min.js" id="fc-gaa-google-address-autocomplete-js"></script>
I believe this is just add the following to the exclusions: wp-content/plugins/fc-google-address-autocomplete/js/google-address-autocomplete-118.min.js
2)
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=myAPIkey&libraries=places&callback=GoogleAddressAutocomplete.init" id="fc-gaa-google-address-api-js"></script>
This is the one I’m having issues with, what should I put into the exclusion box?
I’ve tried just using the ids,
id:fc-gaa-google-address-api-js
id:fc-gaa-google-address-autocomplete-jsbut google autocomplete works when debloat JS optimisation is off, and (I’m assuming through my inept use of the exclusions) doesn’t work with debloat’s JS defer optimisation on.
what should I be writing in there?
regards Philip
- The topic ‘Referencing Google Map Scripts’ is closed to new replies.