Page 12 of 21

Journey Recording using GPS Tracking

Posted: Mon Jul 08, 2013 12:52 pm
by Kateryna Grynko

Hi Joe,

Please take a look at the last line of the log..


Journey Recording using GPS Tracking

Posted: Mon Jul 08, 2013 4:51 pm
by Joe Paisley

Im sorry Katya, what action needs to be taken to correct this? Thank you!


Journey Recording using GPS Tracking

Posted: Mon Jul 08, 2013 8:23 pm
by Maryna Brodina

Hello! Looks like you have some errors in your custom JS code. You need to debug it http://docs.appery.io/documentation/a...


Journey Recording using GPS Tracking

Posted: Thu Jul 11, 2013 10:36 pm
by Joe Paisley

Could it be in my show page javascript?
code
Appery("pause").hide();
Appery("start").hide();

try{
var coordsArray = JSON.parse(localStorage.getItem("coordsArray"));
var startTime = coordsArray[0].time;
var points = [];
for (var i=0; i<coordsArray&#46;length; i++){
points&#46;push([(coordsArray&#46;time - startTime) &#47; 1000 &#47; 60, coordsArray&#46;speed]);
}
var plot = $&#46;jqplot('plot2', [points], {
series:[{showMarker:false}],
axes:{
xaxis:{
label:'Journey Time (minutes)',
labelRender: $&#46;jqplot&#46;CanvasAxisLabelRenderer},
yaxis:{
label:'Altitude (feet)',
labelRenderer: $jqplot&#46;CanvasAxisLabelRenderer}

var plot = $&#46;jqplot('plot1', [points], {
series:[{showMarker:false}],
axes:{
xaxis:{
label:'Journey Time (minutes)',
labelRenderer: $&#46;jqplot&#46;CanvasAxisLabelRenderer
},
yaxis:{
label:'Speed (m&#47;h)',
labelRenderer: $&#46;jqplot&#46;CanvasAxisLabelRenderer
}
}
});
} catch ( e ){
}
/code
JSLint shows: Image

Which error is causing the console error "unexpected token var"? And what should I change to fix this error?

I deeply appreciate all of your help in this. Once these to jplot graphs populate data in them, the app will be complete.

Could it not be working because I have moved it all to one page instead of two separate pages?

Thanks once more.


Journey Recording using GPS Tracking

Posted: Fri Jul 12, 2013 6:12 pm
by Maryna Brodina

Hi Joe! There are three brackets missing in your code. Instead of codevar plot = $&#46;jqplot('plot2', [points], {
series:[{showMarker:false}],
axes:{
xaxis:{
label:'Journey Time (minutes)',
labelRender: $&#46;jqplot&#46;CanvasAxisLabelRenderer},
yaxis:{
label:'Altitude (feet)',
labelRenderer: $jqplot&#46;CanvasAxisLabelRenderer}/code
should be codevar plot = $&#46;jqplot('plot2', [points], {
series:[{showMarker:false}],
axes:{
xaxis:{
label:'Journey Time (minutes)',
labelRender: $&#46;jqplot&#46;CanvasAxisLabelRenderer},
yaxis:{
label:'Altitude (feet)',
labelRenderer: $jqplot&#46;CanvasAxisLabelRenderer}
}
})/code


Journey Recording using GPS Tracking

Posted: Mon Jul 15, 2013 1:37 am
by Joe Paisley

Thanks so much Marina!


Journey Recording using GPS Tracking

Posted: Mon Jul 15, 2013 1:44 am
by Joe Paisley

I'm recording ride data on the "recordride" page, and I don't see any errors in the "logcat" in Eclipse. The tracking is working, but the jplot graphs are not appearing for some reason. What could be causing this? I've included the JSLint screenshot. Image


Journey Recording using GPS Tracking

Posted: Mon Jul 15, 2013 6:12 am
by Maryna Brodina

Hi, JSLint doesn't show errors, please check console.


Journey Recording using GPS Tracking

Posted: Mon Jul 15, 2013 7:23 pm
by Joe Paisley

Thanks Marina! I wasn't sure, but I assumed you would have let me know about the error the first time I shared the initial "JSLint" screenshot. The error that is appearing in logcat now is below. Is this the error causing the jplot graphs to not appear on the "recordride" page? Thank you so much for you time!

Image Image


Journey Recording using GPS Tracking

Posted: Mon Jul 15, 2013 8:12 pm
by Kateryna Grynko

Hi Joe,

In these logs there are messages from both OS and other applications run simultaneously with your app. Sorry, we can't say what caused the error.