Opened 6 years ago

Last modified 6 years ago

#18494 closed enhancement

[PATCH] GPX layers should use the name from the file instead of `Downloaded GPX Data` whenever possible — at Initial Version

Reported by: taylor.smock Owned by: team
Priority: normal Milestone: 20.01
Component: Core Version:
Keywords: gpx Cc:

Description

Right now it is not possible to set the name of a GPX layer on download. This means that GPX layers are commonly called Download GPX Data. It would be nice, if there is a name in the metadata, if JOSM could use that instead.

Use cases:
Tasking Managers could send an XML file that looks like this:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<gpx creator="HOT Tasking Manager" version="1.1">
<metadata>
<link href="https://github.com/hotosm/tasking-manager">
<text>HOT Tasking Manager</text>
</link>
<time>2019-12-31T21:56:28.586152</time>
<name>Tasking Manager: Project 1, Task 1</name>
</metadata>
<trk>
<name>
Task for project 1. Do not edit outside of this area!
</name>
<trkseg>
<trkpt lat="39.070328" lon="-108.561121"/>
<trkpt lat="39.070438" lon="-108.571025"/>
<trkpt lat="39.077663" lon="-108.57099"/>
<trkpt lat="39.077499" lon="-108.56091"/>
<trkpt lat="39.070328" lon="-108.561121"/>
</trkseg>
</trk>
<wpt lat="39.070328" lon="-108.561121"/>
<wpt lat="39.070438" lon="-108.571025"/>
<wpt lat="39.077663" lon="-108.57099"/>
<wpt lat="39.077499" lon="-108.56091"/>
<wpt lat="39.070328" lon="-108.561121"/>
</gpx>

Please note that the current version of the tasking manager (TM3) creates an empty layer with the desired name and then loads in the GPX file.

Change History (1)

by taylor.smock, 6 years ago

Attachment: 18494.patch added

Initial patch (no tests)

Note: See TracTickets for help on using tickets.