angularjs - How to access Google Map API for fetching address depend on pincode? -


i have used below code fetching address depend on pincode giving error

$http.get('//maps.googleapis.com/maps/api/geocode/json?address=500082&sensor=true')                 .then(function (results) {                     return results;                 }); 

i set

 $httpprovider.defaults.headers.common['x-requested-with'] = 'xmlhttprequest';     $httpprovider.defaults.withcredentials = true; 

in config block

error:-xmlhttprequest cannot load http://maps.googleapis.com/maps/api/geocode/json?address=500082&sensor=true. response preflight request doesn't pass access control check: wildcard '*' cannot used in 'access-control-allow-origin' header when credentials flag true. origin 'http://localhost:2808' therefore not allowed access. credentials mode of xmlhttprequest controlled withcredentials attribute.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -