Fixed geocoding with components
This commit is contained in:
@@ -67,7 +67,7 @@ class GeocodioBulkGeocoder(GeocodioGeocoder, StreetPointBulkGeocoder):
|
||||
return results
|
||||
|
||||
def _country_code(self, country):
|
||||
country_iso3166 = None
|
||||
country_iso3166 = country
|
||||
country_iso3 = country_to_iso3(country)
|
||||
if country_iso3:
|
||||
country_iso3166 = countries.get(country_iso3).alpha2.lower()
|
||||
|
||||
@@ -59,7 +59,8 @@ class GeocodioGeocoder(Traceable):
|
||||
|
||||
try:
|
||||
free_text_components = [searchtext, city, state_province, country]
|
||||
response = self._geocoder.geocode(';'.join([c for c in free_text_components if c is not None and c.strip()]))
|
||||
req = '; '.join([c for c in free_text_components if c is not None and c.strip()])
|
||||
response = self._geocoder.geocode(req)
|
||||
|
||||
return self._parse_geocoder_response(response)
|
||||
except GeocodioDataError as gde:
|
||||
|
||||
Reference in New Issue
Block a user