{"id":346116,"date":"2026-07-25T21:32:51","date_gmt":"2026-07-25T21:32:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/gpx-route-map\/"},"modified":"2026-07-25T21:32:34","modified_gmt":"2026-07-25T21:32:34","slug":"gpx-route-map","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/gpx-route-map\/","author":6373861,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.0.2","requires":"6.6","requires_php":"7.4","requires_plugins":null,"header_name":"GPX Route Map","header_author":"SirLouen <sir.louen@gmail.com>","header_description":"Attach a GPX track to any post or page and render it as an interactive OpenStreetMap map with waypoints, distance and an elevation profile.","assets_banners_color":"","last_updated":"2026-07-25 21:32:34","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/SirLouen\/gpx-route-map","header_author_uri":"https:\/\/github.com\/SirLouen","rating":0,"author_block_rating":0,"active_installs":0,"downloads":26,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"SirLouen","date":"2026-07-25 21:32:34"}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":{"gpx-route-map\/map":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"gpx-route-map\/map","title":"GPX Route Map","category":"media","icon":"location-alt","description":"Render a GPX track as an interactive OpenStreetMap map with waypoints, distance and an elevation profile.","keywords":["gpx","map","route","elevation","openstreetmap","trail","hiking","cycling"],"textdomain":"gpx-route-map","supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true}},"attributes":{"gpxId":{"type":"number"},"gpxUrl":{"type":"string","default":""},"height":{"type":"number","default":480},"showStats":{"type":"boolean","default":true},"showElevation":{"type":"boolean","default":true},"maxZoom":{"type":"number","default":17},"tileUrl":{"type":"string","default":""}},"editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","style":"file:.\/style-index.css","viewScriptModule":"file:.\/view.js","render":"file:.\/render.php"}},"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"An interactive route map with waypoints and an elevation profile.","2":"Selecting a GPX file in the block editor."}},"plugin_section":[],"plugin_tags":[226762,10682,2909,16164,10346],"plugin_category":[49],"plugin_contributors":[273313],"plugin_business_model":[],"class_list":["post-346116","plugin","type-plugin","status-publish","hentry","plugin_tags-elevation","plugin_tags-gpx","plugin_tags-map","plugin_tags-openstreetmap","plugin_tags-route","plugin_category-maps-and-location","plugin_contributors-sirlouen","plugin_committers-sirlouen"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/gpx-route-map.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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 <code>.gpx<\/code> file, and visitors get:<\/p>\n\n<ul>\n<li>An interactive OpenStreetMap map powered by MapLibre GL.<\/li>\n<li>The track drawn as a route line with start and end markers.<\/li>\n<li>Support for both GPX tracks (<code>&lt;trk&gt;<\/code>) and GPX routes (<code>&lt;rte&gt;<\/code>), e.g. Garmin Connect course exports.<\/li>\n<li>Waypoint markers with popups for any <code>&lt;wpt&gt;<\/code> points in the file.<\/li>\n<li>A stats bar: distance, elevation gain, elevation loss and max elevation.<\/li>\n<li>A hand-drawn elevation profile you can scrub with mouse or touch, the position syncs onto the map.<\/li>\n<\/ul>\n\n<p>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.<\/p>\n\n<p>You can author tracks in any GPX tool, for example the free <a href=\"https:\/\/gpx.studio\">gpx.studio<\/a> editor, then upload the resulting file to your Media Library.<\/p>\n\n<h4>OpenStreetMap tile usage<\/h4>\n\n<p>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 <code>tile.openstreetmap.org<\/code>, which means that server receives the visitor's IP address, browser User-Agent and the coordinates of the map area viewed. See the <a href=\"https:\/\/operations.osmfoundation.org\/policies\/tiles\/\">OpenStreetMap Tile Usage Policy<\/a> and the <a href=\"https:\/\/osmfoundation.org\/wiki\/Privacy_Policy\">OSMF Privacy Policy<\/a>. The same data is sent to any custom tile provider you configure instead.<\/p>\n\n<p>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 <code>gpxrm_tile_url<\/code> filter). Attribution to OpenStreetMap is always shown, as the license requires.<\/p>\n\n<h4>Source code<\/h4>\n\n<p>The JavaScript files in <code>build\/<\/code> are minified. The human-readable source lives in the plugin's <code>src\/<\/code> directory, which is included in this plugin, and is also available with full build instructions at the public repository: <a href=\"https:\/\/github.com\/SirLouen\/gpx-route-map\">https:\/\/github.com\/SirLouen\/gpx-route-map<\/a>. The plugin is built with Vite (<code>pnpm install &amp;&amp; pnpm run build<\/code>).<\/p>\n\n<h3>Usage<\/h3>\n\n<p>Block: search for \"GPX Route Map\" in the block inserter, then choose a GPX file.<\/p>\n\n<p>Shortcode: <code>[gpx_route_map]<\/code><\/p>\n\n<p>Examples:<\/p>\n\n<pre><code>[gpx_route_map id=\"123\"] - render the GPX attachment with ID 123.\n[gpx_route_map gpx=\"https:\/\/example.com\/route.gpx\" height=\"520\" elevation=\"false\"]\n<\/code><\/pre>\n\n<p>Shortcode attributes:<\/p>\n\n<ul>\n<li><code>id<\/code> - Attachment ID of a .gpx file uploaded to the Media Library.<\/li>\n<li><code>gpx<\/code> - Attachment ID, or an absolute URL to a .gpx file (alternative to <code>id<\/code>).<\/li>\n<li><code>height<\/code> - Map height in pixels, from 200 to 1200. Default: 480.<\/li>\n<li><code>stats<\/code> - Show the stats bar (distance, elevation, waypoints). <code>true<\/code> or <code>false<\/code>. Default: true.<\/li>\n<li><code>elevation<\/code> - Show the interactive elevation profile. <code>true<\/code> or <code>false<\/code>. Default: true.<\/li>\n<li><code>maxzoom<\/code> - Maximum zoom level, from 1 to 22. Default: 17.<\/li>\n<li><code>tile<\/code> - Custom raster tile URL template using <code>{z}\/{x}\/{y}<\/code>. Default: OpenStreetMap.<\/li>\n<\/ul>\n\n<p>Provide either <code>id<\/code> or <code>gpx<\/code>. The block exposes the same options in its sidebar (Source, Display and Map tiles panels).<\/p>\n\n<p>Filters (for developers):<\/p>\n\n<ul>\n<li><code>gpxrm_tile_url<\/code> - change the default raster tile URL template.<\/li>\n<li><code>gpxrm_tile_attribution<\/code> - change the attribution HTML.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>gpx-route-map<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install through the Plugins screen.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Add the <strong>GPX Route Map<\/strong> block to a post or page and select a GPX file, or use the shortcode.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20require%20advanced%20custom%20fields%20or%20any%20other%20plugin%3F\"><h3>Does it require Advanced Custom Fields or any other plugin?<\/h3><\/dt>\n<dd><p>No. It has no plugin dependencies and works with core WordPress.<\/p><\/dd>\n<dt id=\"where%20do%20the%20maps%20and%20elevation%20come%20from%3F\"><h3>Where do the maps and elevation come from?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20use%20my%20own%20map%20tiles%3F\"><h3>Can I use my own map tiles?<\/h3><\/dt>\n<dd><p>Yes, set a custom tile URL in the block's Map tiles panel or with the <code>gpxrm_tile_url<\/code> filter.<\/p><\/dd>\n<dt id=\"can%20i%20link%20a%20gpx%20file%20hosted%20on%20another%20site%3F\"><h3>Can I link a GPX file hosted on another site?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"why%20don%27t%20my%20existing%20gpx%20files%20appear%20in%20the%20media%20picker%3F\"><h3>Why don't my existing GPX files appear in the media picker?<\/h3><\/dt>\n<dd><p>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 <code>gpx<\/code>.<\/p><\/dd>\n<dt id=\"the%20front%20end%20says%20%22map%20failed%20to%20load.%22%20what%27s%20wrong%3F\"><h3>The front end says \"Map failed to load.\" What's wrong?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: GPX Route Map block and <code>[gpx_route_map]<\/code> shortcode with MapLibre map, waypoints, stats and an interactive elevation profile.<\/li>\n<\/ul>","raw_excerpt":"Attach a GPX track to any post or page and render it as an interactive OpenStreetMap map with waypoints, distance and an elevation profile.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/346116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=346116"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sirlouen"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=346116"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=346116"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=346116"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=346116"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=346116"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=346116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}