diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-08-17 10:00:37 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-08-17 10:00:37 +0200 |
commit | f6d9d738e1067397cc62485e76f2beeac85b914f (patch) | |
tree | a20cd096e38df2b7f12c02158dfd701d94b9dfa1 /templates/polyline.gpx.ep | |
parent | e97f7892a6d1a74e729dc676fb90db8afc408db5 (diff) |
Journey: Add JSON and GPX export of polylines
Diffstat (limited to 'templates/polyline.gpx.ep')
-rw-r--r-- | templates/polyline.gpx.ep | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/templates/polyline.gpx.ep b/templates/polyline.gpx.ep new file mode 100644 index 0000000..a243926 --- /dev/null +++ b/templates/polyline.gpx.ep @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gpx + xmlns="http://www.topografix.com/GPX/1/1" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" + version="1.1" + creator="travelynx <%= $version %>"> + <trk> + <name><%= $name %></name> + <trkseg> + % for my $entry (@{$polyline // []}) { + <trkpt lon="<%= $entry->[0] %>" lat="<%= $entry->[1] %>"> + % if ($entry->[2]) { + <name><%= $entry->[2] %></name> + % } + </trkpt> + % } + </trkseg> + </trk> +</gpx> |