/// <summary> /// Launches the apps from the current /// </summary> /// <param name="latitude">The latitude</param> /// <param name="longitude">The longitude</param> /// <param name="address">The address representing the end destination</param> public void LaunchMapDirections(string source, string destination) { if (string.IsNullOrEmpty(destination)) return; var t = new Microsoft.Phone.Tasks.MapsDirectionsTask(); t.Start = new Microsoft.Phone.Tasks.LabeledMapLocation(); t.Start.Label = source; t.End = new Microsoft.Phone.Tasks.LabeledMapLocation(); t.End.Label = destination; t.Show(); }
/// <summary> /// Launches the apps from the current /// </summary> /// <param name="latitude">The latitude</param> /// <param name="longitude">The longitude</param> /// <param name="address">The address representing the end destination</param> public void LaunchMapDirections(double latitude, double longitude, string address) { var t = new Microsoft.Phone.Tasks.MapsDirectionsTask(); t.Start = new Microsoft.Phone.Tasks.LabeledMapLocation(); t.Start.Location = new System.Device.Location.GeoCoordinate(); t.Start.Location.Latitude = latitude; t.Start.Location.Longitude = longitude; t.End = new Microsoft.Phone.Tasks.LabeledMapLocation(); t.End.Label = address; t.Show(); }