mukasa ronald

mukasa ronald

  • NA
  • 7
  • 2.8k

How to set the right start location

Jul 27 2015 3:12 AM
how can i set my way points to be known; this is my code:
// setup the waypoints
Waypoint wpStart = new Waypoint();
wpStart.Location = start;
wpStart.Description = "Crane Bank US";
req.Waypoints = new System.Collections.ObjectModel.ObservableCollection<Waypoint>();
req.Waypoints.Add(wpStart);
Waypoint wpEnd = new Waypoint();
wpEnd.Location = destination;
wpEnd.Description = "watoto";
req.Waypoints.Add(wpEnd);
// display start and destination with pushpins
map1.Children.Clear();
Pushpin p = new Pushpin();
p.Location = wpStart.Location;
p.Content = wpStart.Description;
p.Background = new SolidColorBrush(Colors.Red);
map1.Children.Add(p);
p = new Pushpin();
p.Location = wpEnd.Location;
p.Content = wpEnd.Description;
p.Background = new SolidColorBrush(Colors.Blue);
map1.Children.Add(p);
// start the route calculation
rc.CalculateRouteAsync(req);
 

Attachment: windows phone 71.zip