How to use GPX extensions to customize tracks

Posted on 22 October, 2019

Category:

User guides

Topic:

GPX tracks

Starting with v4.7 you can add GPX extensions to your gpx files in order to customize the appearance of your tracks:

You can customize the color, weight and opacity of full tracks or track segments by changing your GPX files according to the examples below.

In order to use the extensions, you also have to add the following namespace declaration to the header of the file:

<gpx [...] xmlns:mmp="https://www.mapsmarker.com/GPX/1/">

Example for customizing full track:

<trk>
    <extensions>
        <mmp:color>#f00</mmp:color>
        <mmp:weight>3</mmp:weight>
        <mmp:opacity>1</mmp:opacity>
    </extensions>
    <trkseg>
        <trkpt></trkpt>
        ...
    </trkseg>
</trk>

Example for customizing track segments:

<trk>
    <trkseg>
        <extensions>
            <mmp:color>#f00</mmp:color>
            <mmp:weight>3</mmp:weight>
            <mmp:opacity>1</mmp:opacity>
        </extensions>
        <trkpt></trkpt>
        ...
    </trkseg>
    <trkseg>
        <extensions>
            <mmp:color>#00f</mmp:color>
            <mmp:weight>2</mmp:weight>
            <mmp:opacity>0.5</mmp:opacity>
        </extensions>
        <trkpt></trkpt>
        ...
    </trkseg>
</trk>