Hi Kalai91
try this to calculate distance b/w tow places in window 8 App
private double CalculateDistance(double prevLat, double prevLong, double currLat, double currLong)
{
const double degreesToRadians = (Math.PI / 180.0);
const double earthRadius = 6371;
var prevRadLat = prevLat * degreesToRadians;
var prevRadLong = prevLong * degreesToRadians;
var currRadLat = currLat * degreesToRadians;
var currRadLong = currLong * degreesToRadians;
var radDeltaLat = currRadLat - prevRadLat;
var radDeltaLong = currRadLong - prevRadLong;
var expr1 = (Math.Sin(radDeltaLat / 2.0) *
Math.Sin(radDeltaLat / 2.0)) +
(Math.Cos(prevRadLat) *
Math.Cos(currRadLat) *
Math.Sin(radDeltaLong / 2.0) *
Math.Sin(radDeltaLong / 2.0));
var expr2 = 2.0 * Math.Atan2(Math.Sqrt(expr1),
Math.Sqrt(1 - expr1));
var distance = (earthRadius * expr2);
return distance * 1000;
}