Closed lgdean closed 7 years ago
My friend tried too, and was sometimes getting the error, and sometimes not.
The wifi is too slow, at the moment, to see whether the same problem happens in production.
@lgdean This looks to be an issue w/ the data from db/export.csv
. Philz Coffee and the associated data no longer exist at 3901 18th st.
The 2 warnings from Google Maps API should not affect the features of the application.
@lgdean I've made a separate issue to address this https://github.com/RefugeRestrooms/refugerestrooms/issues/303
An address that should work locally is New College
.
This is the geocoding endpoint: https://maps.googleapis.com/maps/api/geocode/json?address=3901+18th+Street,+San+Francisco,+CA
which seems to be functional
I'm heading on vacation until next week, but if this is still up when I get back, I'll take a stab at this along with #299
Taking a first glance and it seems like the last time we deployed was 12 months ago and as of last June they started requiring an API key for the JS API: https://maps-apis.googleblog.com/2016/06/building-for-scale-updates-to-google.html
We'll need to follow this and distribute the key: https://developers.google.com/maps/documentation/javascript/get-api-key
Haven't gone through the setup yet, but it seems like it has to be updated here: https://github.com/RefugeRestrooms/refugerestrooms/blob/e379eb8057c68173111b6827df0dbbec8be658f6/app/views/layouts/_head.html.haml#L9
It doesn't matter how well encrypted/stored it is, since you could get it just by querying our app, but it should be thrown into a config. That being said, I'm not seeing if there's an easy way to stop someone from rate limiting rate limiting us unless we do the queries server side or maybe google has IP based rate limiting built in for us?
Anyways, mostly seems administrative (making a google account and creating the key).
Yeah, limiting seems to be my only concern here. Since as i understood it the last time I had a conversation with google folks. The advantage with doing client side was we wouldn't be rate limited. We tried geocoding searches on our servers but we quickly hit the limit. I can probably try to take care of this. I may have some time on Sunday afternoon to work on it.
Acrcording to #316 this is fixed, looks like this issue here can be closed.
Running the app locally, I searched in San Francisco, clicked on one of the results in the list (http://localhost:3000/restrooms/10), and got a page with info about the bathroom, and an error from Google instead of a map.
In the JS console, I found a
Google Maps API error: MissingKeyMapError
error, and two warnings.See attached screenshot.
Chrome 56 on a Mac, in case it matters.