Adam Tucker
Posts: 0
Joined: Sun Sep 01, 2013 8:17 pm

Compass Javascript CSS and other terrible things

Hello, at the moment I'm trying to set up a compass with my app.
At the moment I have got to the point where I can get the gyro to give a heading reading in the form of an alert in a radial fashion (0-360) using this code:
function onSuccess(heading) {
alert('Heading: ' + heading.magneticHeading);
};

function onError() {
alert('onError!');
};

Firstly how can I change this to get this to a label.

I was then thinking of using this label as a variable for CSS to rotate a needle around a compass anyone got any ideas with anything
Kind regards

Return to “Issues”