I've been researching this for over an hour, and can't find a solution that works.
My js:
var googleUrl = 'https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Vict&types=geocode&language=fr&key=<MY KEY>'
$.ajax({
type: 'GET',
url: googleUrl,
dataType: 'jsonp',
success: function(response) {
console.log(response)
},
error: function(response) {
console.log(response);
}
})
I saw this question, which suggested a 'callback method' - I still can no figure out why I'm getting the error: Uncaught SyntaxError: Unexpected token :
I see it has been marked a duplicate -- but as I have already indicated, I have tried everything in that other post, and I am still unable to get the access to work, without using JSONP. Constructive feedback of how to solve the problem would be useful.
Any advice is appreciated!!
UPDATE - obviously my key in my code is not 'my key'.