Skip to content

Commit

Permalink
Fix scoping of reverse geocode result
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jul 22, 2010
1 parent 9f83acf commit 7298467
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/application_helper.rb
Expand Up @@ -85,8 +85,8 @@ def describe_location(lat, lon, zoom = nil, language = nil)
url = "http://nominatim.openstreetmap.org/reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{language}"

begin
Timeout::timeout(4) do
response = REXML::Document.new(Net::HTTP.get(URI.parse(url)))
response = Timeout::timeout(4) do
REXML::Document.new(Net::HTTP.get(URI.parse(url)))
end
rescue Exception
response = nil
Expand Down

0 comments on commit 7298467

Please sign in to comment.