Navigation Menu

Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

No way to retrieve "description" and "tags" for uploaded GPX tracks? #3278

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: hartmut[at]php.net
[Submitted to the original trac issue database at 4.57pm, Monday, 11th October 2010]

When uploading a GPX track file via "/api/0.6/gpx/create" i can provide "description" and "tags" fields, none of the gpx related API functions seem to be able to retrieve these values though?

Proposed enhancement alternatives:

  • add "description" and "tags" attributes to the <gpx_file> tags returned by /api/0.6/gpx//details
  • instead of adding attributes to <gpx_file> maybe make <gpx_file> a container that may have optional and data subcontainers (field contents are usually rather short though, so attributes may be sufficient)
  • create separate API calls for these values
@openstreetmap-trac
Copy link
Author

Author: hartmut[at]php.net
[Added to the original trac issue at 6.02pm, Monday, 11th October 2010]

proposed patch (from someone with next to zero ruby foo)
for the simple "extra attributes" approach

--- a/app/models/trace.rb
+++ b/app/models/trace.rb
@@ -155,6 +155,8 @ class Trace < ActiveRecord::Base
el1['visibility'] = self.visibility
el1['pending'] = (!self.inserted).to_s
el1['timestamp'] = self.timestamp.xmlschema

  • el1['description'] = self.description;
  • eli['tags'] = self.tags.join(" ,");
    return el1
    end

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 6.17pm, Monday, 11th October 2010]

Implemented (as subelements).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant