I have read numerous pages, everything seems to dance around my answer and I cant wrap my head around it. I had a working asset tracker project, but the java script was using the spark api.
the tutorial I followed years ago only used device id and access token to retrieve data from a function, then I parsed the data into the useful information. this is the part of my webpage to get the data
device.onEvent(false, function(data){
if (data.name == "GPS") {
var gpslocation = data.data.split(',');
var lat = gpslocation[0];
var lat = lat.replace(/[{}]/g, '');
var lat = parseFloat(lat);
var lon = gpslocation[1];
var lon = parseFloat(lon);
var mph = gpslocation[2];
var batt = gpslocation[3];
var batt = batt.replace(/[{}]/g, '');
var mph = parseFloat(mph);
var batt = parseFloat(batt);
var mylocation=new google.maps.LatLng( lat, lon);
and this is where I call the function
device.callFunction('gps');
I define my acessToken as a variable, it just seems as if there isn’t anyway to use the api without user and password , which id rather not use.
