Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addressFile = File.open("Alarm.txt")
- #temp = "100 Avery St" ## This works
- #destination = temp.gsub!(' ','+')
- address = addressFile.read()
- destination = address.gsub!(' ','+') ##This doesnt work
- addressFile.close()
- uri =URI("http://open.mapquestapi.com/directions/v1/route?key=&ambiguities=ignore&from=1600+Spring+St,Parkersburg,WV&to=#{destination},Parkersburg,WV&callback=renderNarrative&outFormat=xml")
- directions = Net::HTTP.get(uri)
- file = File.open("directions.xml", 'w')
- File.write(file, directions)
- parseDirections()
Advertisement
Add Comment
Please, Sign In to add comment