I’'m enrolled with Thinkful, working on my Front-End Capstone, and am having lots of trouble. I am attempting to use Google Maps API to get Details and Places for a local restaurant search web app. I feel like I’ve exhausted all other efforts (Slack channels, mentor, Q&A sessions with Thinkful, Google, etc.)
First of all, here’s my repo. The up-to-date branch is ‘errors’ branch, while the master has no issues (other than maybe I’m doing something fundamentally wrong in my code that I don’t know about).
GET https://maps.googleapis.com/maps/api/place/findplacefromtext/json?&key=AIzaSyCT4F67piVv6cvASPssAR1s_buPw6kBQw0&query=vegan 500 () /Users/DavidDoes/Documents/projects/veghead/index.html?#resources:1 Failed to load https://maps.googleapis.com/maps/api/place/findplacefromtext/json?&key=AIzaSyCT4F67piVv6cvASPssAR1s_buPw6kBQw0&query=vegan: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 500.
Someone linked me to this post on Stack Overflow, but I’m not sure how to implement that in my situation.
- How can I access the API once I’ve “captured” it. So once I get these errors out of the way, how can I console.log the objects so I know how to get the information (key:value pairs) that I need?
- I’m pretty vague on how callback functions work. I know that my button click listener needs to pass the user’s input to a function, and call a function, but it’s pretty fuzzy beyond that.
Thank you all!