You create a Microsoft MapPoint Web Service application that accepts routes from users. You need to find points of interest that are within one mile of a route or within three miles of the endpoints of the route. What are two possible ways to achieve the goal? (Each correct answer presents a complete solution. Choose two.)
A.
findNearRouteSpec.Distance = 1; findResults = findService.FindNearRoute(findNearRouteSpec); foundLocations.Add(findResults); findNearbySpec.Distance = 3; findNearbySpec.LatLong = startLatLong; findResults = findService.FindNearby(findNearbySpec); foundLocations.Add(findResults); findNearbySpec.LatLong = endLatLong; findResults = findService.FindNearby(findNearbySpec); foundLocations.Add(findResults);
B.
findNearRouteSpec.Distance = 1; findResults = findService.FindNearRoute(findNearRouteSpec); foundLocations.Add(findResults); findNearbySpec.Distance = 3; foreach (FindResult findResult in findResults.Results) { findNearbySpec.LatLong = findResult.FoundLocation.LatLong; findResults =
findService.FindNearby(findNearbySpec); foundLocations.Add(findResults); }
C.
findNearRouteSpec.Distance = 1; findResults = findService.FindNearRoute(findNearRouteSpec); foundLocations.Add(findResults); findNearbySpec.Distance = 3; foreach (Segment segment in route.Itinerary.Segments) { findNearbySpec.LatLong = segment.Waypoint.Location.LatLong; findResults = findService.FindNearby(findNearbySpec); foundLocations.Add(findResults); }
D.
findNearRouteSpec.Distance = 1; findResults = findService.FindNearRoute(findNearRouteSpec); foundLocations.Add(findResults); findNearbySpec.Distance = 3; foreach (Segment segment in route.Itinerary.Segments) { foreach (Direction direction in segment.Directions) { findNearbySpec.LatLong = direction.LatLong; findResults = findService.FindNearby(findNearbySpec); foundLocations.Add(findResults); } }