I'm thrashing around in the dark here, trying to read the 'ele' tags in a GPX file. I can't find actual examples anywhere, or help with the API. The map itself is quite successful for showing (and toggling) gpx tracks, and displaying the lengths. See wed-slow-fast27mar.htm but I'd now like to add the total ascents as well. How do you implement the read function?
var runslow = "../gpx/wed-slow-06feb13.gpx" // read function for runslow here // // then calculate the ascent: var eles = runslow.getElementsByTagName("ele"); for (var i=0, len=eles.length; i<len; i++) { if (eles[i] > eles[i-1]) ascent = ascent + (eles[i] - eles[i-1]); -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLayers-Format-GPX-read-function-syntax-to-read-ele-tags-tp5043707.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users