I am making an app with c# for my windows phone 7. I want to use compass for showing me the qibla direction (or which way I want). how can I make it? I can calculate the degrees of qibla direction from my location with lang and latitute.(for example result is 150 degress east of north)
but then, I cannot draw the direction line for it.it shows north, not my way which I want. so now I am using this code for drawing line:
magneticLine.X2 = magneticLine.X1 - (200 * Math.Sin(MathHelper.ToRadians((float)compassReading.MagneticHeading)));
magneticLine.Y2 = magneticLine.Y1 - (200 * Math.Cos(MathHelper.ToRadians((float)compassReading.MagneticHeading)));
can you help me about how I can make this. thanks.