Send _serial_geocode for single results
This commit is contained in:
parent
f618e4aec3
commit
40ace9cfaa
@ -59,11 +59,7 @@ class MapboxBulkGeocoder(MapboxGeocoder, StreetPointBulkGeocoder):
|
|||||||
|
|
||||||
def _batch_geocode(self, searches):
|
def _batch_geocode(self, searches):
|
||||||
if len(searches) == 1:
|
if len(searches) == 1:
|
||||||
# A single search can take advantage of country fixing
|
return self._serial_geocode(searches)
|
||||||
search = searches[0]
|
|
||||||
elements = self._encoded_elements(search)
|
|
||||||
coordinates = self._geocode_search(*elements)
|
|
||||||
return [(search[0], coordinates, [])]
|
|
||||||
else:
|
else:
|
||||||
frees = []
|
frees = []
|
||||||
for search in searches:
|
for search in searches:
|
||||||
|
Loading…
Reference in New Issue
Block a user