Hi, there
I found this comment inside "OpenLayers-2.7.Format.GPX.js" file:
// We don't yet support extraction of trkpt attributes

Any particular reason why? Because that's exactly what I need. I want to show trkpt's data (time and speed) in popups along the GPS track instead of wpt

Also, where are the extracting functions called from - "GPX.Format.js" or "OpenLayers-2.7.Format.GPX.js"?

Best regards

Comments

jpulles’s picture

Hi,

The GPX.Format.js file is only used for the previous 2.6 release of OpenLayers.

The OpenLayers-2.7.Format.GPX.js file is a slightly modified version of the OpenLayers Format/GPX.js file; it reads the waypoints as the last features in order to get them on top when drawing them. See also http://trac.openlayers.org/ticket/1763.
The "We don't support ..." will be an OpenLayers comment; since the track points are not drawn as points, there would be no use in reading attributes for them.

provod’s picture

OK, I see. Then to show trackpoints with their attributes only the functions in "OpenLayers-2.7.Format.GPX.js" need to be modified or there's more to it?

Cheers

jpulles’s picture

Yes, you probably should read the trackpoints similar to how waypoints are read.

Cheers.

jpulles’s picture

Status: Active » Closed (fixed)