Skip to content

Instantly share code, notes, and snippets.

@bogardpd
Created September 30, 2019 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogardpd/b41a51abc146220f2bf6140fe7cb8c8d to your computer and use it in GitHub Desktop.
Save bogardpd/b41a51abc146220f2bf6140fe7cb8c8d to your computer and use it in GitHub Desktop.
/app/classes/map.rb
#/app/classes/map.rb
def gpx
output = %Q(<?xml version="1.0" encoding="UTF-8" ?>).html_safe
output += content_tag(:gpx, xmlns: "http://www.topografix.com/GPX/1/1", version: "1.1") do
concat (content_tag(:metadata) do
concat content_tag(:name, map_name)
concat content_tag(:desc, map_description)
concat (content_tag(:author) do
concat content_tag(:name, "Paul Bogard’s Flight Historian")
concat content_tag(:link, content_tag(:text, "Paul Bogard’s Flight Historian"), href: "https://www.flighthistorian.com")
end)
end)
# (airport code here)
# (route code here)
end
return output
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment