× Forum for the GPXTrackMap Content Plugin for Joomla! 2.5 and 3.x

Error on Map Display

fingeradmin replied the topic: Error on Map Display - CLOSED + some Garmin hints

11 years 5 months ago

Hi *,

just to close this thread:

thanks to Steve's help, GTM can now (since V1.1.3) also handle GPX files that contain Routes, but no Tracks.

In Garmin's Basecamp software, you can (quite easily) plan Routes. These are composed of Waypoints that you plan to travel. They will show up on the Basecamp map like a Track (if you have a "routable" map installed) - but if you export those, the resulting GPX file will "only" contain the Waypoints and some (meta-) data about the route.

If you feed such a file into GPXTrackMap (or, rather, the Openlayers API), it will show the Waypoints inter-connected with straight lines. Hmm, that's only helpful if you have a helicopter at hand ;)

The "trick" is to make Basecamp convert the Route into a Track: double-click the route, and then choose "Convert to track" (or sthg. similar - i only have a German version of Basecamp here, but you should find it).

If you export that selection to a GPX file (the Track, not the Route!), Basecamp will export a file which should work fine for displaying with GPXTrackMap.

Only downside here: the plugin will report the length of the track fine, but the time will show up as "00:00:00".

hth & cheers,
Frank

Please Log in or Create an account to join the conversation.

fingeradmin replied the topic: Error on Map Display

11 years 5 months ago

Hello Steve,

that explains it - the plugin was designed to show recorded tracks, and those will normally contain a list of (at least 2 or more) trackpoints.

Trying to explain this better: Being a non-native English speaker, it took me a while to figure out the difference between a "track" and a "route" in the GPX specification - the German language is a bit ambiguous here (both terms translate to "Route").

So, in terms of GPX files (and my own understanding´of it, which may be wrong ;-) ):

- a "route" is where you will/should/want to/plan to go (->in the future, planning)
- a "track" is where you actually did go (->in the past, recorded)
- a "waypoint" is 'just' a coordinate pair
(which comes *either* from a planned route, *or* from a point where you have been while you recorded a track. That bit confused me!)

...so my "advice" would be: go there! take your GPS with you to record your actual track(whether you stayed on the planned routeor not...)

- that (recorded) track should be displayed correctly, or else there's a bug in my plugin that i should fix ;-)

(I fixed / circumvented the "div by 0" error in the meantime, drop me a note if you want to try that fixed version)

- however, happy hikin'!

P.S. thanks for your good explanation, and precisely reported error message - that made it easy to pin-point the cause of the problem!

regards,
Frank

Last edit: 11 years 5 months ago by fingeradmin.

Please Log in or Create an account to join the conversation.

wanderer replied the topic: Error on Map Display

11 years 5 months ago

Frank,

Thanks for the explanation. The .gpx file only contains waypoints as the method I used for planning and routing purposes. I was not using trackpoints to create these routes.

Now understanding its the difference between (required) trackpoints and waypoints, I understand why the error occurs and will adjust my use of the plugin & mapping requirements accordingly.

Thanks very much for the quick response.

Steve

Please Log in or Create an account to join the conversation.

fingeradmin replied the topic: Error on Map Display

11 years 5 months ago

Hello,

the error occurs when the plugin tries to calculate the average distance between track points in the file. The only way i can see this fail is when it doesn't find any track points at all (Note: trackpoints are different from waypoints!)

Could you send me the GPX file directly? I'll have a look then.

Anyway i'll include a check to avoid the div by zero error in the next release - thanks for pointing that out!

regards,
Frank

Please Log in or Create an account to join the conversation.

wanderer created the topic: Error on Map Display

11 years 5 months ago

I receive an error message when the plugin loads a map from a gpx file. It happens no matter which map service I use.

Error: " Warning: Division by zero in /xxxxxxxx/plugins/content/gpxtrackmap/gpxtrackmap.php on line 695 "

This is being used on Joomla 2.5.9 with PHP 5.3.14. The .gpx file does have its own markers and elevations besides assigning beginning and ending points within the plugin.

The elevation profile does not show. I am including a screenshot of the results.

Can you give me some idea of what may be occurring?

Attachments:
Last edit: 11 years 5 months ago by wanderer. Reason: Add screenshot

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum