I am not good at math so please help me with this. I have distance in meters and I need to calculate zoom level and center to map from this. How can I do that? I started with this but now I am completly lost:
var sCoord = new GeoCoordinate(startPoint.X, startPoint.Y);
var eCoord = new GeoCoordinate(latitude, longitude);
var distance = sCoord.GetDistanceTo(eCoord);
Thanks
If I understated you correctly, you can achieve the goal by using the following code
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));