GPX Viewer


Displays a GPX track as segmented polylines, the way points and the elevation profile.
Open Street Map (OSM) is used as background which can be switched between a plane view and a topographic one.
The view can be changed to full screen mode. Moving the cursor over the elevation profile the corresponding point is marked on the path interactively.

GPX tracks uploaded to the server in advance are stored into separate repositories that are ordered according to the categories setup in wordpress.
Thus different collections of tracks can be handled and the tracks choosen from.

During upload a GPX track can be smoothed and/or its elevation data replaced by Open-Elevation Service data.
The latter is provided because many elevation data tracked by mobiles are not quite correct.

GPX trackpoints can be edited on the map interactively.


  • Admin page GPX Files for uploading tracks
    – Selecting category for repository
    – Replacing the description of the track (tag <name> in the GPX file)
    – Smoothing tracks during upload, thus reducing track points
    – Replacing elevation data of track points using Open-Elevation Service during upload
  • Display of a specific, uploaded GPX track
    – PHP-function for inserting the view into a page
    – Selecting full screen mode and scaling the map
    – Switching between plane and topographic view
  • Editing trackpoints on the map
    – Adding, moving, deleting track points
    – creating, splitting polylines
  • Display of a list of GPX files from which a track can be selected
    – separated list for each category
    – Setting width and color of the path
    – Shortcode for inserting the list into a page
  • Elevation profile
    – Interactive path marker
    – Name of the track
    – Distance of the track
    – Maximum/minimum elevation
    – Elevation loss/gain
    – Trail duration

Capturas de pantalla

  • Track selected from a file list
  • Editing trackpoints


Installation and Settings:

  1. Upload the plugin files to the /wp-content/plugins/<my-plugin-name> directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the Plugins screen in WordPress
  3. Use the Settings->GPX Viewer screen to configure the plugin at least one time (Measure Units, …)

Uploading GPX files:

  • Goto GPX Files in the admin menu
  • Choose category for repository: Uploaded file will be stored in directory ~/wp-content/uploads/gpx/<mycategory>/.
  • Choose GPX file to upload
  • Optionally replace description of track (tag <name> in the GPX file)
  • Optionally smooth track during upload, i.e. reducing track points and smoothing elevation data
  • Optionally replace elevation data using Open-Elevation Service

Basic usage:

  • Calling the viewer for a specific GPX track:

        echo gpx_view(array('src'  => $filepath                $filepath = <absolute path>/wp-content/uploads/gpx/<mycategory>/<file>.gpx 
                        [, 'title' => $track_name]
                        [, 'color' => $track_color]
                        [, 'width' => $track_width]
                        [, 'download_button'=> true/false]));
  • Shortcode to include a GPX track for a given category into a WordPress-page.

    [gpx-view category="<mycategory>" gpx-file="<filename>"]
  • Shortcode to include the list of the GPX files for a given category into a WordPress-page. From this list a track can be selected and displayed.

    [gpx-view category="<mycategory>"]
  • Shortcode to open a gpx track locally for editing. The result can be stored again locally.

  • Shortcode to display the gpx track with given color and/or width.

    [gpx-view ... color="<rgb-color>" width="<number>"]


7 de Mayo de 2024
Great plugin, does exactly what it’s supposed to. From me, it’s 4 stars. If there are no security issues, it’s a solid 5-star rating. @ Alex How about the code quality here? I’ve installed Wordfence on my project and after 3 hours, a security notice popped up indicating that the file had changed. No malicious code can be injected here, right? I look forward to your feedback 😀 Filename: /…/…/…/wp-content/plugins/gpx-viewer/js/gpxCleaner.js Message Wordfence: This file belongs to plugin “GPX Viewer” version “2.2.5” and has been modified from the file that is distributed by for this version. Please use the link to see how the file has changed. If you have modified this file yourself, you can safely ignore this warning. If you see a lot of changed files in a plugin that have been made by the author, then try uninstalling and reinstalling the plugin to force an upgrade. Doing this is a workaround for plugin authors who don’t manage their code correctly.
2 de Septiembre de 2022
This plugin has great potential to become a full running statistics for WP Idea: – Week, month and year state – Maybe something like (were you run all the streets in a city) – Sotering at various clubs and or areas
20 de Agosto de 2022
This plugin is just what I’ve been looking for and does the job well. Just a few points, firstly the full-screen mode doesn’t seem to work with Safari browser (you get a black screen), although it seems fine with every other browser I’ve tried, secondly, I’ve had to add a css statement .content { width:100%; } to get the table to float alongside the graph on Safari. These are probably Safari quirks rather than problems with the plugin. One other thing: I’d like a way to display the Author of the GPX file, to give them credit for it. Apart from those issues, I really like this plugin very much.
22 de Enero de 2021
Perhaps interesting plugins. Unfortunetely, just one map type. I would like to use it with open Topo Map for trekking. Possible to Improve it ? Thanks a lot.
Leer los 5 comentarios

Colaboradores & Desarrolladores

“GPX Viewer” es software de código abierto. Las siguientes personas han contribuido a este plugin.


“GPX Viewer” ha sido traducido en 4 idiomas. Gracias a los traductores por sus contribuciones.

Traduce “GPX Viewer” a tu idioma.

¿Interesado en el desarrollo?

Revisa el código, echa un vistazo al repositorio SVN, o suscríbete al registro de desarrollo por RSS .

Historial de cambios


  • Added: Scrollbar for gpx file list


  • Handling of missing fields improved


  • Update problem solved


  • Keeping given gpx attributes and extension elements


  • Editable trackpoints
  • Handling of GPX segments as separated polylines
  • Full screen mode using the whole screen


  • Editing trackpoints of locally opened gpx files


  • corrections for editing trackpoints of locally opened gpx files
  • correction of missing return value in shortcode function


  • scalebar added to maps


  • In shortcode procedure the function for searching category terms corrected


  • Topographic map view added


  • Error correction: Edited gpx tracks couldn’t be updated or stored


  • Error correction: Error when displaying categories in admin screen


  • Error correction: Error when displaying categories in admin and edit screen


  • Code review


  • Enhanced trackpoint reduction for decending slopes


  • Working search function for track list


  • GPX tracks with valid xml schema (gpx.xsd) when exported


  • Showing elevation profile if all elevation values are less than 0


  • MapQuest Elevation Srvice replaced by Open-Elevation Service


  • Shortcode for embedding a single track into a WordPress-page


  • Minor Enhancements


  • Corrections uploading gpx file, writing track name


  • Corrections displaying track name, shortcode with color and width


  • enabling editing of new tracks