Title: GPX Route Map
Author: Manuel Camargo
Published: <strong>July 25, 2026</strong>
Last modified: July 25, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/gpx-route-map.svg)

# GPX Route Map

 By [Manuel Camargo](https://profiles.wordpress.org/sirlouen/)

[Download](https://downloads.wordpress.org/plugin/gpx-route-map.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/gpx-route-map/#description)
 * [Reviews](https://wordpress.org/plugins/gpx-route-map/#reviews)
 *  [Installation](https://wordpress.org/plugins/gpx-route-map/#installation)
 * [Development](https://wordpress.org/plugins/gpx-route-map/#developers)

 [Support](https://wordpress.org/support/plugin/gpx-route-map/)

## Description

GPX Route Map turns a GPX file into an interactive map on the front end of your 
site. Drop the block into any post or page, pick a `.gpx` file, and visitors get:

 * An interactive OpenStreetMap map powered by MapLibre GL.
 * The track drawn as a route line with start and end markers.
 * Support for both GPX tracks (`<trk>`) and GPX routes (`<rte>`), e.g. Garmin Connect
   course exports.
 * Waypoint markers with popups for any `<wpt>` points in the file.
 * A stats bar: distance, elevation gain, elevation loss and max elevation.
 * A hand-drawn elevation profile you can scrub with mouse or touch, the position
   syncs onto the map.

The map loads lazily (only when it scrolls into view) so it never slows down your
page, and multiple maps can live on the same page.

You can author tracks in any GPX tool, for example the free [gpx.studio](https://gpx.studio)
editor, then upload the resulting file to your Media Library.

#### OpenStreetMap tile usage

By default the map uses OpenStreetMap’s public tile server, an external service.
When a page with a map is viewed, the visitor’s browser loads map tiles directly
from `tile.openstreetmap.org`, which means that server receives the visitor’s IP
address, browser User-Agent and the coordinates of the map area viewed. See the 
[OpenStreetMap Tile Usage Policy](https://operations.osmfoundation.org/policies/tiles/)
and the [OSMF Privacy Policy](https://osmfoundation.org/wiki/Privacy_Policy). The
same data is sent to any custom tile provider you configure instead.

The public OSM tile server is rate-limited and is not intended for high-traffic 
sites. For busy sites, set a custom tile provider in the block’s Map tiles panel(
or via the `gpxrm_tile_url` filter). Attribution to OpenStreetMap is always shown,
as the license requires.

#### Source code

The JavaScript files in `build/` are minified. The human-readable source lives in
the plugin’s `src/` directory, which is included in this plugin, and is also available
with full build instructions at the public repository: [https://github.com/SirLouen/gpx-route-map](https://github.com/SirLouen/gpx-route-map).
The plugin is built with Vite (`pnpm install && pnpm run build`).

### Usage

Block: search for “GPX Route Map” in the block inserter, then choose a GPX file.

Shortcode: `[gpx_route_map]`

Examples:

    ```
    [gpx_route_map id="123"] - render the GPX attachment with ID 123.
    [gpx_route_map gpx="https://example.com/route.gpx" height="520" elevation="false"]
    ```

Shortcode attributes:

 * `id` – Attachment ID of a .gpx file uploaded to the Media Library.
 * `gpx` – Attachment ID, or an absolute URL to a .gpx file (alternative to `id`).
 * `height` – Map height in pixels, from 200 to 1200. Default: 480.
 * `stats` – Show the stats bar (distance, elevation, waypoints). `true` or `false`.
   Default: true.
 * `elevation` – Show the interactive elevation profile. `true` or `false`. Default:
   true.
 * `maxzoom` – Maximum zoom level, from 1 to 22. Default: 17.
 * `tile` – Custom raster tile URL template using `{z}/{x}/{y}`. Default: OpenStreetMap.

Provide either `id` or `gpx`. The block exposes the same options in its sidebar (
Source, Display and Map tiles panels).

Filters (for developers):

 * `gpxrm_tile_url` – change the default raster tile URL template.
 * `gpxrm_tile_attribution` – change the attribution HTML.

## Blocks

This plugin provides 1 block.

 *   GPX Route Map Render a GPX track as an interactive OpenStreetMap map with waypoints,
   distance and an elevation profile.

## Installation

 1. Upload the `gpx-route-map` folder to `/wp-content/plugins/`, or install through
    the Plugins screen.
 2. Activate the plugin.
 3. Add the **GPX Route Map** block to a post or page and select a GPX file, or use
    the shortcode.

## FAQ

### Does it require Advanced Custom Fields or any other plugin?

No. It has no plugin dependencies and works with core WordPress.

### Where do the maps and elevation come from?

Map rendering uses MapLibre GL JS (BSD-3-Clause) with OpenStreetMap raster tiles.
The track and elevation are parsed from your GPX file in the browser; stats are 
also computed server-side for local files so they appear without JavaScript.

### Can I use my own map tiles?

Yes, set a custom tile URL in the block’s Map tiles panel or with the `gpxrm_tile_url`
filter.

### Can I link a GPX file hosted on another site?

Only if that host allows cross-origin (CORS) requests, because the visitor’s browser
fetches the file directly, and most external sites don’t send the required header.
The front end then shows “Could not load GPX file.” even though the link opens fine
in a browser tab. Uploading the file to your Media Library is the reliable option.

### Why don’t my existing GPX files appear in the media picker?

GPX files uploaded before this plugin was activated may be stored with a generic
XML type or no type at all. The picker shows GPX and XML types; files stored with
an empty or unrelated type won’t appear. Re-upload them to fix the stored type. 
On multisite, the network’s “Upload file types” setting must also include `gpx`.

### The front end says “Map failed to load.” What’s wrong?

The map library could not be downloaded. The plugin loads its map code as a native
JavaScript module, which optimization plugins normally leave alone. But if yours
is configured to combine, inline or relocate module scripts, exclude this plugin’s
view script from it. Visitors on a flaky connection can simply click the message
to retry.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“GPX Route Map” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ Manuel Camargo ](https://profiles.wordpress.org/sirlouen/)

[Translate “GPX Route Map” into your language.](https://translate.wordpress.org/projects/wp-plugins/gpx-route-map)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/gpx-route-map/), check
out the [SVN repository](https://plugins.svn.wordpress.org/gpx-route-map/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/gpx-route-map/) 
by [RSS](https://plugins.trac.wordpress.org/log/gpx-route-map/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * Initial release: GPX Route Map block and `[gpx_route_map]` shortcode with MapLibre
   map, waypoints, stats and an interactive elevation profile.

## Meta

 *  Version **1.0.0**
 *  Last updated **14 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.6 or higher **
 *  Tested up to **7.0.2**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [elevation](https://wordpress.org/plugins/tags/elevation/)[GPX](https://wordpress.org/plugins/tags/gpx/)
   [map](https://wordpress.org/plugins/tags/map/)[openstreetmap](https://wordpress.org/plugins/tags/openstreetmap/)
   [route](https://wordpress.org/plugins/tags/route/)
 *  [Advanced View](https://wordpress.org/plugins/gpx-route-map/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/gpx-route-map/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/gpx-route-map/reviews/)

## Contributors

 *   [ Manuel Camargo ](https://profiles.wordpress.org/sirlouen/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/gpx-route-map/)