So you're saying I need to add javascript to the geolocation success service event that looks something like this:code coordsArray.push({'alt': timeStamp, 'lat': data.coords.latitude, 'lng': data.coords.longitude, 'alt': alt}); localStorage.setItem(coordsArray", JSON.stringify(coordsArray));/code
And something under code Appery('dataLabel")/code line to include
code 'Altitude: ' + data.coords.altitude+ '<br>' +/code
for the label on the "record ride" page to show a value. Then add
code for (var i = 0; i < coordsArray.length; i++) {
points.push([(coordsArray.time - startTime) / 1000, coordsArray.alt]);
}/code
after code for (var i = 0; i < coordsArray.length; i++) {
points.push([(coordsArray.time - startTime) / 1000, coordsArray.speed]);
}/code
so that plot2 will show the altitude data with the following code under var plot1 code var plot2 = $.jqplot('plot2', [points], {
series: [{
showMarker: false
}],
axes: {
xaxis: {
label: 'Journey Time (minutes)',
labelRender: $.jqplot.CanvasAxisLabelRenderer
},
yaxis: {
label: 'Altitude (feet)',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
}
});/code?