Add service configuration (URL, etc) for Mapzen Geocoding

This commit is contained in:
Javier Goizueta
2017-03-06 10:20:20 +01:00
parent c0374f5800
commit 29cdd8099a
5 changed files with 49 additions and 10 deletions

View File

@@ -115,7 +115,7 @@ RETURNS Geometry AS $$
redis_conn = GD["redis_connection_{0}".format(username)]['redis_metrics_connection']
user_geocoder_config = GD["user_geocoder_config_{0}".format(username)]
plpy.execute("SELECT cdb_dataservices_server._get_logger_config()")
logger_config = GD["logger_config"]
logger = Logger(logger_config)
@@ -174,7 +174,7 @@ RETURNS Geometry AS $$
raise Exception('You have reached the limit of your quota')
try:
geocoder = MapzenGeocoder(mapzen_geocoder_config.mapzen_api_key, logger)
geocoder = MapzenGeocoder(mapzen_geocoder_config.mapzen_api_key, logger, mapzen_geocoder_config.service_params)
country_iso3 = None
if country:
country_iso3 = country_to_iso3(country)