X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/162ffd9acccc844ab37b4f60b1ff9d5465f43686..8bd001f1282b7a33a71c0565504e160dbe567d5d:/lib/osm.rb?ds=inline diff --git a/lib/osm.rb b/lib/osm.rb index 40027991a..71e12534f 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -480,7 +480,7 @@ module OSM minlon = [(@lon - lonradius) * 180 / PI, -180].max maxlon = [(@lon + lonradius) * 180 / PI, 180].min - { :minlat => minlat, :maxlat => maxlat, :minlon => minlon, :maxlon => maxlon } + BoundingBox.new(minlon, minlat, maxlon, maxlat) end # get the SQL to use to calculate distance @@ -514,9 +514,9 @@ module OSM country = "GB" if country == "UK" end - return country + country rescue StandardError - return nil + nil end def self.ip_location(ip_address)