X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/029547855f76e5b3e628959cff01871865a07bc8..0e9e6e6f8f15e6dbdd208cd741386562e2aceee8:/app/controllers/geocoder_controller.rb?ds=sidebyside diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index 8f02ce51d..8d29ad505 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -154,7 +154,7 @@ class GeocoderController < ApplicationController end # ask nominatim - response = fetch_xml("#{NOMINATIM_URL}search?format=xml&q=#{escape_query(query)}#{viewbox}#{exclude}&accept-language=#{request.user_preferred_languages.join(',')}") + response = fetch_xml("#{NOMINATIM_URL}search?format=xml&q=#{escape_query(query)}#{viewbox}#{exclude}&accept-language=#{http_accept_language.user_preferred_languages.join(',')}") # create result array @results = Array.new @@ -241,7 +241,7 @@ class GeocoderController < ApplicationController @results = Array.new # ask nominatim - response = fetch_xml("#{NOMINATIM_URL}reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{request.user_preferred_languages.join(',')}") + response = fetch_xml("#{NOMINATIM_URL}reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{http_accept_language.user_preferred_languages.join(',')}") # parse the response response.elements.each("reversegeocode/result") do |result|