xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(255, 0);
//watchPosition(positionChanged)
//locationData = getCurrentPosition();
intervalCurrentPosition(positionChanged, 1000) //1000ms = 1sek
}
function positionChanged(position) {
print("lat: " + position.latitude);
//print("long: " + position.longitude);
background (100)
fill(0, 255, 0);
text("lat: " + position.latitude, windowWidth / 30, windowHeight / 2 + 10);
text("long: " + position.longitude, windowWidth / 30, windowHeight / 2 + 20);
text("alt: " + position.altitude, windowWidth / 30, windowHeight / 2 + 30);
fill(255, 0, 0);
text("hed: " + position.heading, windowWidth / 30, windowHeight / 2 + 40);
fill(0, 255, 0);
text("speed: " + position.speed, windowWidth / 30, windowHeight / 2 + 50);
}