datamade / my-reps

:busts_in_silhouette: Enter your address to find your elected representatives. Powered by the Google Civic Information API
https://myreps.datamade.us
MIT License
70 stars 178 forks source link

Freezes when trying to enter address #22

Open micheleacox opened 4 years ago

micheleacox commented 4 years ago

When I try to enter an address in the address bar, the bar turns gray after entering one key stroke. See screen shot:

image

I've tested my Google API key using test links given by Google (see below), and as far as I can tell the API key is working.

The links between my-reps pages are also working, i.e. I can click "more about this project" and get a new page.

This is my first time using Jekyll, and I am having to run it asbundle exec jekyll server -w, so perhaps there is an issue with my install.

API Key Test Links https://www.googleapis.com/civicinfo/v2/elections?key= https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=

derekeder commented 4 years ago

hi @micheleacox - looks like it is an issue with the API key. When you set up your Google API key, you'll need to make sure its either unrestricted or that you've added your website to the list of allowed referrers: https://developers.google.com/maps/documentation/javascript/get-api-key#restrict_key

hsewebteam commented 3 years ago

I'm having the same issue. Have added the API in the script code. Verified the domain, setup billing, and added credentials in google api console. Still cant do address lookup. any suggestions?