I am using this code from Google Map API\'s and it is not working
Google Map API
Place Autocomplete
The fix is really simple: just replace YOUR_API_KEY on the last line of your code with your actual API key!
If you don't have one, you can get it for free on the Google Developers Website.