New plugin "GPX Viewer": Displays GPS tracks on map

Find help with FlatPress plugins, report a plugin bug, request or present new plugins.
Post Reply
User avatar
Arvid
FlatPress Coder
Posts: 114
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

New plugin "GPX Viewer": Displays GPS tracks on map

Post by Arvid » Sun Nov 01, 2020 11:32 am

Hi,

I'm happy to introduce to you my latest FlatPress plugin: GPX Viewer!

It makes use of Jürgen Berkemeier's free JavaScript library GPX Viewer to display uploaded GPS-recorded tracks and routes (GPX format) on a OpenStreetMap map with a corresponding height profile.
It adds a BBCode tag “gpx” to include your uploaded GPX file into your blog entry or static page. It's really just as simple as that:

Code: Select all

[gpx="attachs/file.gpx"]
See the plugin in action on my personal bike touring blog: https://fahrrad.arvidzimmermann.de/2020 ... -mrkische/

Download and documentation on the wiki

Please let me know if you encounter any bugs or glitches.

All the best,
Arvid
Helpful FlatPress links: Project blog 📝 - FlatPress wiki 📖 - FlatPress@Twitter 🐦
Stay up to date with our feeds: Forum RSS feed 📜 - Project blog RSS feed 📜


🇩🇪 Habe aktuell für meinen Arbeitgeber hier im Ruhrgebiet eine Stelle zu besetzen! 🇩🇪
- Softwareentwickler (Webanwendungen) - unbefristet, sofort

dsteuer
Posts: 18
Joined: Sun May 24, 2020 11:21 am

Re: New plugin "GPX Viewer": Displays GPS tracks on map

Post by dsteuer » Sun Nov 01, 2020 2:14 pm

Congratulation! Cool plugin!

Detlef

miksmith
Posts: 16
Joined: Wed Jul 31, 2019 4:32 pm

Re: New plugin "GPX Viewer": Displays GPS tracks on map

Post by miksmith » Mon Nov 02, 2020 9:22 am

Brilliant job! This is great to have :D

Ive uploaded a test tracklog and the track seems to be offset. Having tried this on a couple of route planning sites, they seem to be correct. Is this ia bug in the underlying library?

cheers

mike

dsteuer
Posts: 18
Joined: Sun May 24, 2020 11:21 am

Re: New plugin "GPX Viewer": Displays GPS tracks on map

Post by dsteuer » Mon Nov 02, 2020 10:11 am

miksmith wrote:
Mon Nov 02, 2020 9:22 am
Brilliant job! This is great to have :D

Ive uploaded a test tracklog and the track seems to be offset. Having tried this on a couple of route planning sites, they seem to be correct. Is this ia bug in the underlying library?

cheers

mike
You could try it out here: https://www.j-berkemeier.de/ShowGPX.html That's the main page of the lib devel.

Detlef

miksmith
Posts: 16
Joined: Wed Jul 31, 2019 4:32 pm

Re: New plugin "GPX Viewer": Displays GPS tracks on map

Post by miksmith » Mon Nov 02, 2020 11:22 am

Ah, good idea! Yes, that works fine. Does that mean its likely a problem with the plugin?

User avatar
Arvid
FlatPress Coder
Posts: 114
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: New plugin "GPX Viewer": Displays GPS tracks on map

Post by Arvid » Wed Nov 11, 2020 11:23 am

Hi,

thanks for reporting. The FlatPress template around may set a margin to images which causes the offset.
Please add the follwoing to your fp-plugins/gpx/res/gpxplugin.css:

Code: Select all

div.leaflet-pane img {
	/* image margins given by the FP template have to be reset in order to avoid track offset */
	margin: 0px !important;
}
This should remove the offset, does it?

I will add this to the plugin package.

All the best,
Arvid
Helpful FlatPress links: Project blog 📝 - FlatPress wiki 📖 - FlatPress@Twitter 🐦
Stay up to date with our feeds: Forum RSS feed 📜 - Project blog RSS feed 📜


🇩🇪 Habe aktuell für meinen Arbeitgeber hier im Ruhrgebiet eine Stelle zu besetzen! 🇩🇪
- Softwareentwickler (Webanwendungen) - unbefristet, sofort

miksmith
Posts: 16
Joined: Wed Jul 31, 2019 4:32 pm

Re: New plugin "GPX Viewer": Displays GPS tracks on map

Post by miksmith » Wed Nov 11, 2020 2:14 pm

Yes, that fix works :D

miksmith
Posts: 16
Joined: Wed Jul 31, 2019 4:32 pm

Re: New plugin "GPX Viewer": Displays GPS tracks on map

Post by miksmith » Fri Nov 13, 2020 5:31 pm

Is there a way to change the default basemap?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests