xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
watchPosition(positionChanged)
locationData = getCurrentPosition();
}
/*
function preload() {
watchPosition(draw);
}
*/
function draw(){
//locationData = getCurrentPosition();
text(locationData.latitude, 200, windowHeight/2)
text(locationData.longitude, 200, windowHeight/2+10)
}
function positionChanged(position){
//circle(mouseX, mouseY, 20);
background(100)
for (i=0; i<1000; i++) {
//text(position.latitude, 200, windowHeight/2)
//text(position.longitude, 200, windowHeight/2+10)
text(position.accuracy, 200, windowHeight/2+20)
text(position.altitudeAccuracy, 200, windowHeight/2+30)
text(position.heading, 200, windowHeight/2+40)
text(position.speed, 200, windowHeight/2+50)
}
}