Created
September 30, 2019 01:03
-
-
Save bogardpd/0d06b58ad1f8474efb0833dd83a86d76 to your computer and use it in GitHub Desktop.
/app/classes/map.rb Completing the gpx method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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) | |
concat gpx_airports(used_airports) | |
concat gpx_routes(routes_normal | routes_out_of_region | routes_highlighted | routes_unhighlighted) | |
end | |
return output | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment