Tuesday, June 12, 2012 12:35 PM
Can you plz suggest me that how can i add two or more viaWaypoints in the routins services while creating a route.
Thanx in advance
Tuesday, June 12, 2012 1:28 PMOwnerYou haven't really given us much details here. An example of how to use the viaWaypoints can be found here: http://msdn.microsoft.com/en-us/library/hh441727.aspx
Tuesday, June 12, 2012 1:56 PM
1. I have Starting point & ending point.
2. By Each click Event(mouse click) I will get the points
NOW 3. viaWayPoints are starting -> Point(clicked one) -> ending
4. draw route using routing services.
Thanx in advance
Tuesday, June 12, 2012 3:07 PMOwnerYou haven't specified which map API you are using. The approach you will want to take is to have an array that stores your waypoints. As the user clicks the map you will want to insert the new waypoint into the array as the second last point. This will ensure that your end point doesn't change.
- Marked As Answer by prakash_light Wednesday, June 13, 2012 4:40 AM
Wednesday, June 13, 2012 4:50 AM
I m using silverlight->Bing map.
can i use the array for the user clicks & just an object for the starting point and Ending point.
RouteService.Waypoint srat= new RouteService.Waypoint();
start.Location = new RouteService.Location();
start.Location.Latitude = LocationOfWorkOrder.Latitude;
start.Location.Longitude = LocationOfWorkOrder.Longitude;
RouteService.Waypoint end= new RouteService.Waypoint();
end.Location = new RouteService.Location();
end.Location.Latitude = locFinal.Latitude;
end.Location.Longitude = locFinal.Longitude;
array for usr clicks.
and lastly add the array and start and end object to the routerequest object.
Wednesday, June 13, 2012 9:09 AMOwnerIt looks like you are using the Bing Maps SOAP service. viaWaypoints is only supported for the Bing Maps REST service. You can find information on how to use the REST services in .NET here: http://rbrundritt.wordpress.com/2012/01/06/bing-maps-rest-service-net-libraries/
- Marked As Answer by prakash_light Wednesday, June 13, 2012 11:26 AM
Wednesday, June 13, 2012 12:05 PM
Thnx Richard for ur valuable help....
i am getting the route as i like it.but !!!!!!! thing is why it is not clearing the previous route...if m using the line code
2.IT IS IN THE PICTURE
Wednesday, June 13, 2012 3:46 PMOwnerWhy not just clear the layer using RoadMapLayer.Children.Clear();
- Marked As Answer by prakash_light Thursday, June 14, 2012 5:03 AM
Thursday, June 14, 2012 5:05 AM
Thnx Richard...i appreciate ur help....it works...f9..
i have learned always a lot from ur experiance..thnx a lot