eileenmcnaughton / org.wikimedia.geocoder

Geocoder for CiviCRM
Other
6 stars 17 forks source link

Google Maps geocoding not working #54

Closed aydun closed 6 months ago

aydun commented 8 months ago

Google Maps geocoding is not working - the API key is set in the config but does not get passed correctly in CRM_Utils_geocode_Geocode::getProviderClass()

Issue 1) The argument string of 'geocoder.api_key' gets looked up in getProviderArgument() and then again in getProviderClass() It looks like functionality may have been intended to move from one function to the other, but is duplicated. Removing the if (is_string($argument).....) and always returning $argument resolves this for Google but I don't know whether any other providers would be adversely affected by that change.

Issue 2) As shown in the google-maps-provider example, the API key needs to be the second parameter with the first one (region) being null (or set to a region). The current options for the structure of 'argument' don't allow a first null parameter to be set.

Tested on current master.

github-actions[bot] commented 6 months ago

Stale issue message

eileenmcnaughton commented 6 months ago

Closed in #55