X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/08f0621d6f9342ab473cd1fdc262a5b6e9a368c3..3e49e4a62ad9ccce7a193ab0393a7722896455aa:/app/controllers/geocoder_controller.rb diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index d92da72b1..b9cf8d096 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -6,6 +6,7 @@ class GeocoderController < ApplicationController before_action :authorize_web before_action :set_locale before_action :require_oauth, :only => [:search] + authorize_resource :class => false def search @params = normalize_params @@ -305,7 +306,9 @@ class GeocoderController < ApplicationController params.merge!(dms_to_decdeg(latlon)).delete(:query) elsif latlon = query.match(/^\s*([+-]?\d+(\.\d*)?)\s*[\s,]\s*([+-]?\d+(\.\d*)?)\s*$/) - params.merge!(:lat => latlon[1].to_f, :lon => latlon[3].to_f, :latlon_digits => true).delete(:query) + params.merge!(:lat => latlon[1].to_f, :lon => latlon[3].to_f).delete(:query) + + params[:latlon_digits] = true unless params[:whereami] end end