X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/549acfa918c04fa20b3386fece25ce69b3565519..45e6ebcafc5741750357b7fd6e11ec96c2cbfb24:/lib/osm.rb 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)