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:
Rafa de la Torre
2017-03-08 13:07:07 +01:00
committed by GitHub

View File

@@ -29,6 +29,11 @@ class MapzenGeocoder(Traceable):
@qps_retry(qps=20)
def geocode(self, searchtext, city=None, state_province=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,
state_province,
country, search_type)