Author Topic: Modifying GPX File?  (Read 1264 times)

Modifying GPX File?
« on: 25 November, 2017, 04:56:49 pm »
What a useful program GPX Editor is!

I have just been using it to create a map showing the whereabouts of
colleagues in an organisation, adapting waypoints:

http://www.gpxeditor.co.uk/routes2/users/thoratherapist/SupervisorLocations

I like how hovering over a name causes the relevant waypoint to change
colour.

My question is, would it be possible for me to adapt the resulting
simple gpx file.  With a very rudimentary knowledge of HTML, I realise
the creator will have css files in the background determining the appearance of
what appears on screen.

What I would like to do is enable the creation of waypoints in an
additional pair of colours (default and hover-over), so that I can
display an additional category of locations on screen.

Is there HTML I can add to the gpx file, which would provide this extra
functionality? I guess these would be colour attributes of the waypoint
definition that could be used to override the default in selected cases.

I hope that all makes sense!

My very rudimentary knowledge of HTML means that I don't know if I can override the default definition in this way.

Any help gratefully received.

If this isn't going to work, perhaps there's another mapping program that would allow for colour-coded addition of location points.

Kim

  • Timelord
    • Fediverse
Re: HTML Addition to GPX File?
« Reply #1 on: 25 November, 2017, 05:14:23 pm »
Short answer: No.  You can't put HTML in a GPX file.  It's a totally different (albeit structurally similar, as they share a common heritage) animal.

More useful answer:
In GPX, the way waypoints are rendered is controlled by the <sym></sym> tag.  This is how you'd specify whether a given waypoint appears as a red flag, blue circle, pint of ale, little tent icon, or whatever.  Unfortunately, GPX doesn't specify what the symbols are, so they're renderer-specific.  Here's a list of Garmin's icons.  I've no idea what, if anything, gpxeditor will do with <sym> data.

There might be some other gpxeditor way of achieving what you want (eg. displaying waypoints from multiple GPX files in different ways) - I defer to someone with more than cursory knowledge of GPXeditor.

Re: HTML Addition to GPX File?
« Reply #2 on: 25 November, 2017, 05:53:47 pm »
Thanks, Kim.

As usual, I'm tapping in the dark, but your orientation at least gives me something approaching a white stick!

However, adding <sym>Flag</sym>, for example, to the entry for a specific waypoint makes no difference to the way GPX Editor displays the waypoint.

Re: Modifying GPX File?
« Reply #3 on: 25 November, 2017, 05:55:12 pm »
Title altered to take account of my initial misunderstanding that HTML could edit a GPX file!

fuaran

  • rothair gasta
Re: Modifying GPX File?
« Reply #4 on: 25 November, 2017, 06:02:49 pm »
GPX also has a <type> tag for waypoints, which could be used for a category etc. Though it still depends on whether the software will do anything this tag.
Or you can add extensions to GPX for whatever sort of tags you like, but they are non-standard, so unlikely that any other software would support it.

Maybe try something with KML format, that has more tags to specify what waypoints look like etc.

Or try uMap. It lets you mark waypoints, and adjust the icons, styles, colours etc. And it can import and export in various formats. https://umap.openstreetmap.fr/en/

Re: Modifying GPX File?
« Reply #5 on: 25 November, 2017, 06:22:29 pm »
GPX also has a <type> tag for waypoints, which could be used for a category etc. Though it still depends on whether the software will do anything this tag.
Or you can add extensions to GPX for whatever sort of tags you like, but they are non-standard, so unlikely that any other software would support it.

Maybe try something with KML format, that has more tags to specify what waypoints look like etc.

Or try uMap. It lets you mark waypoints, and adjust the icons, styles, colours etc. And it can import and export in various formats. https://umap.openstreetmap.fr/en/

uMap looks promising! :thumbsup:

Re: Modifying GPX File?
« Reply #6 on: 26 November, 2017, 05:39:40 pm »
Or try uMap. It lets you mark waypoints, and adjust the icons, styles, colours etc. And it can import and export in various formats. https://umap.openstreetmap.fr/en/

uMap certainly came up trumps in the end!