Merge pull request #342 from CartoDB/remove-mapzen-forcing-layers-equal-address
Remove the search_type if its address from the params sent to Mapzen
This commit is contained in:
@@ -29,6 +29,11 @@ class MapzenGeocoder(Traceable):
|
|||||||
@qps_retry(qps=20)
|
@qps_retry(qps=20)
|
||||||
def geocode(self, searchtext, city=None, state_province=None,
|
def geocode(self, searchtext, city=None, state_province=None,
|
||||||
country=None, search_type=None):
|
country=None, search_type=None):
|
||||||
|
|
||||||
|
# Remove the search_type if its address from the params sent to mapzen
|
||||||
|
if search_type and search_type.lower() == 'address':
|
||||||
|
search_type = None
|
||||||
|
|
||||||
request_params = self._build_requests_parameters(searchtext, city,
|
request_params = self._build_requests_parameters(searchtext, city,
|
||||||
state_province,
|
state_province,
|
||||||
country, search_type)
|
country, search_type)
|
||||||
|
|||||||
Reference in New Issue
Block a user