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.
Features
- 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
Installation and Settings:
- Upload the plugin files to the
/wp-content/plugins/<my-plugin-name>
directory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the Plugins screen in WordPress
- Use the Settings->GPX Viewer screen to configure the plugin at least one time (Measure Units, ...)
- Accept the link to https://api.open-elevation.com in your browser
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:
<?php 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.
[gpx-view]
* Shortcode to display the gpx track with given color and/or width.
[gpx-view ... color="<rgb-color>" width="<number>"]