X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e2f1d6017d3e7c243f3e2cdd84e9dbf8378c22b9..0a3aba7f891ba55a5500f02907cec15d44554eae:/app/controllers/notes_controller.rb diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 2089c2289..5a0934247 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -66,20 +66,6 @@ class NotesController < ApplicationController @note = Note.create(:lat => lat, :lon => lon) raise OSM::APIBadUserInput.new("The note is outside this world") unless @note.in_world? - #TODO: move this into a helper function - begin - url = "http://nominatim.openstreetmap.org/reverse?lat=" + lat.to_s + "&lon=" + lon.to_s + "&zoom=16" - response = REXML::Document.new(Net::HTTP.get(URI.parse(url))) - - if result = response.get_text("reversegeocode/result") - @note.nearby_place = result.to_s - else - @note.nearby_place = "unknown" - end - rescue Exception => err - @note.nearby_place = "unknown" - end - # Save the note @note.save!