I am trying to use google place service
$http({
method : 'GET',
url : 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=hotels in US&key=XXXXXXXXX&callback=JSON_CALLBACK'
})
.success(function(data) {
console.log('data' + data);
})
.error(function(data) { });
API call is OK 200. But on console it gives error XMLHttpRequest cannot load https://maps.googleapis.com/maps/api/place/textsearch/json?query=hotels%20in%20US&key=XXXXU&callback=JSON_CALLBACK. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://192.168.1.85:8443' is therefore not allowed access.
I change method:JSONP then it returns data but with syntax error like : required. My server is tomcat 7. I am also using CORS filtercom.thetransactioncompany.cors.CORSFilter .