0001-misc-pass-accept-language-to-nominatim-13759.patch
wcs/api.py | ||
---|---|---|
634 | 634 |
nominatim_url = 'http://nominatim.openstreetmap.org' |
635 | 635 |
get_response().set_content_type('application/json') |
636 | 636 |
url = '%s/reverse?format=json&zoom=18&addressdetails=1&lat=%s&lon=%s' % (nominatim_url, lat, lon) |
637 |
url += '&accept-language=%s' % (get_publisher().get_site_language() or 'en') |
|
637 | 638 |
if get_publisher().get_site_option('nominatim_key'): |
638 | 639 |
url += '&key=' + get_publisher().get_site_option('nominatim_key') |
639 | 640 |
return urllib2.urlopen(url).read() |
wcs/wf/geolocate.py | ||
---|---|---|
112 | 112 |
return |
113 | 113 | |
114 | 114 |
url = '%s/search?q=%s&format=json' % (nominatim_url, urllib2.quote(address)) |
115 |
url += '&accept-language=%s' % (get_publisher().get_site_language() or 'en') |
|
115 | 116 |
if get_publisher().get_site_option('nominatim_key'): |
116 | 117 |
url += '&key=' + get_publisher().get_site_option('nominatim_key') |
117 | 118 | |
118 |
- |