mardi 22 octobre 2019

Is there any way to fix this error 'google is not defined'

I'm using distant matrix and places api to calculate the distance between places and suggestions , I'm using a script on the index blade shows 'google is not defined'

 function initialize() {
      var input = document.getElementById('searchloc');
      var options = {
        types: ['geocode'], //this should work !
        componentRestrictions: {country: "ae"}
      };
      var autocomplete = new google.maps.places.Autocomplete(input, options);     
}
   google.maps.event.addDomListener(window, 'load', initialize);


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire