]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/geocoder_controller.rb
Localisation updates from https://translatewiki.net.
[rails.git] / app / controllers / geocoder_controller.rb
index 4a593f86a76a23250dd294f0141db07ea8399859..8ec0ab6b70acbb6c6e645e9a25229347ebfa0c9b 100644 (file)
@@ -218,10 +218,10 @@ class GeocoderController < ApplicationController
                      query.match(/^(\d{1,3})°?\s*(\d{1,2})['′]?(?:\s*(\d{1,3}(\.\d*)?)?["″]?)?\s*([NS])\W*(\d{1,3})°?\s*(\d{1,2})['′]?(?:\s*(\d{1,3}(\.\d*)?)?["″]?)?\s*([EW])$/).try(:captures)    # degrees, minutes, decimal seconds [NSEW]
         params.merge!(dms_to_decdeg(latlon)).delete(:query)
 
-      elsif latlon = query.match(/^([+-]?\d+(\.\d*)?)(?:\s+|\s*,\s*)([+-]?\d+(\.\d*)?)$/)
+      elsif latlon = query.match(%r{^([+-]?\d+(\.\d*)?)(?:\s+|\s*[,/]\s*)([+-]?\d+(\.\d*)?)$})
         params.merge!(:lat => latlon[1].to_f, :lon => latlon[3].to_f).delete(:query)
 
-        params[:latlon_digits] = true unless params[:whereami]
+        params[:latlon_digits] = true
       end
     end