none
Remove Waypoint from Bing Map RRS feed

  • Question

  • I am using below code from   http://msdn.microsoft.com/en-in/library/dn305988.aspx  to calculate direction

         

    public void GetDirections() { // Set the start and end waypoints Bing.Maps.Directions.Waypoint startWaypoint = new Bing.Maps.Directions.Waypoint("Seattle, WA"); Bing.Maps.Directions.Waypoint endWaypoint = new Bing.Maps.Directions.Waypoint("Portland, OR"); Bing.Maps.Directions.WaypointCollection waypoints = new Bing.Maps.Directions.WaypointCollection(); waypoints.Add(startWaypoint); waypoints.Add(endWaypoint); Bing.Maps.Directions.DirectionsManager directionsManager = myMap.DirectionsManager; directionsManager.Waypoints = waypoints; // Calculate route directions Bing.Maps.Directions.RouteResponse response = await directionsManager.CalculateDirectionsAsync(); // Display the route on the map directionsManager.ShowRoutePath(response.Routes[0]); }

    Then try to remove Waypoints using this code I am able to hide path but not able to hide waypoints

    directionsManager.Waypoints.Remove(startWaypoint);

                directionsManager.Waypoints.Remove(endWaypoint);

                directionsManager.HideRoutePath(route);

    any help appreciated

    Thanks


    Monday, October 6, 2014 11:52 AM

Answers

All replies