Fix scoping of reverse geocode result
This commit is contained in:
parent
9f83acfb44
commit
7298467306
1 changed files with 2 additions and 2 deletions
|
@ -85,8 +85,8 @@ module ApplicationHelper
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue