Windows Phone – 从远处获取缩放级别

我不擅长数学,所以请帮助我。 我有米的距离,我需要计算缩放级别和中心来映射。 我怎样才能做到这一点? 我从这开始,但现在我完全迷失了:

var sCoord = new GeoCoordinate(startPoint.X, startPoint.Y); var eCoord = new GeoCoordinate(latitude, longitude); var distance = sCoord.GetDistanceTo(eCoord); 

谢谢

如果我正确地低估了您,您可以使用以下代码实现目标

 var start = ...; var finish = ...; // Calculate center var center = new GeoCoordinate((start.Latitude + finish.Latitude) / 2, (start.Longitude + finish.Longitude) / 2); var width = Math.Abs(start.Longitude - finish.Longitude); var height = Math.Abs(start.Latitude - finish.Latitude); Map.SetView(new LocationRectangle(center, width, height));