-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch Geocoder to use Mapbox API instead of Google Maps API #37009
Conversation
07e640a
to
05a2b6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
lib/cdo/geocoder.rb
Outdated
@@ -31,7 +31,7 @@ def self.find_potential_street_address(text) | |||
results = Geocoder.search(first_number_to_end) | |||
return nil if results.empty? | |||
|
|||
if results.first.types.include?('street_address') | |||
if results.first.address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting a comment here but I was trying to run this and it was crashing in summarize
as a number of those attributes , such as street_address
, don't exist for Mapbox. Can you take a look?
I'm a bit more worried about this change than I was yesterday. How much have you tested? I'm mostly concerned by the fact that the responses from the two APIs seem to be quite different and a lot of places in our code base use this class |
05a2b6e
to
b66dc04
Compare
b66dc04
to
388f732
Compare
Added tests and will manually test in staging. I will get a proper review during the week. |
Soon we will no longer be able to use the Google Maps API. This change switches our
Geocoder.search
method calls to use the Mapbox API instead.Links
Testing story
Reviewer Checklist: