RouteResultMask Enumeration
RouteResultMask Enumeration
The possible elements to return with a calculated route.
Public Enum RouteResultMask
Member of [Namespace]
[C#]
public enum RouteResultMask : System.Enum
Member of [Namespace]
Members
The following table lists the values for the RouteResultMask enumeration.
Name | Description |
---|---|
CalculatedRouteRepresentation | Calculated route representation (Route.CalculatedRepresentationproperty), used for rendering a highlighted route. Bit value: 2. |
Itinerary | The directions, map view, and summary information (Route.Itinerary property) for a route. Bit value: 1. |
Remarks
- The ResultRouteMask is used with the RouteSpecification.ResultMask property, which is passed to the RouteServiceSoap.CalculateRoute method.
Example
[Visual Basic]
'Route between two locations, only return directions
Dim startLocation As New Location()
Dim endLocation As New Location()
startLocation.LatLong = New LatLong()
endLocation.LatLong = New LatLong()
startLocation.LatLong.Latitude = 40
startLocation.LatLong.Longitude = -120
endLocation.LatLong.Latitude = 41
endLocation.LatLong.Longitude = -121
Dim routeSegmentsSpec(1) As SegmentSpecification
routeSegmentsSpec(0) = New SegmentSpecification()
routeSegmentsSpec(0).Waypoint = New Waypoint()
routeSegmentsSpec(0).Waypoint.Name = "Start"
routeSegmentsSpec(0).Waypoint.Location = startLocation
routeSegmentsSpec(1) = New SegmentSpecification()
routeSegmentsSpec(1).Waypoint = New Waypoint()
routeSegmentsSpec(1).Waypoint.Name = "End"
routeSegmentsSpec(1).Waypoint.Location = endLocation
Dim routeSpec As New RouteSpecification()
routeSpec.DataSourceName = "MapPoint.NA"
routeSpec.ResultMask = RouteResultMask.Itinerary
routeSpec.Segments = routeSegmentsSpec
Dim myRoute As Route
myRoute = routeService.CalculateRoute(routeSpec)
[C#]
//Route between two locations, only return directions
Location startLocation = new Location();
Location endLocation = new Location();
startLocation.LatLong = new LatLong();
endLocation.LatLong = new LatLong();
startLocation.LatLong.Latitude = 40;
startLocation.LatLong.Longitude = -120;
endLocation.LatLong.Latitude = 41;
endLocation.LatLong.Longitude = -121;
SegmentSpecification[] routeSegmentsSpec = new SegmentSpecification[2];
routeSegmentsSpec[0] = new SegmentSpecification();
routeSegmentsSpec[0].Waypoint = new Waypoint();
routeSegmentsSpec[0].Waypoint.Name = "Start";
routeSegmentsSpec[0].Waypoint.Location = startLocation;
routeSegmentsSpec[1] = new SegmentSpecification();
routeSegmentsSpec[1].Waypoint = new Waypoint();
routeSegmentsSpec[1].Waypoint.Name = "End";
routeSegmentsSpec[1].Waypoint.Location = endLocation;
RouteSpecification routeSpec = new RouteSpecification();
routeSpec.DataSourceName = "MapPoint.NA";
routeSpec.ResultMask = RouteResultMask.Itinerary;
routeSpec.Segments = routeSegmentsSpec;
Route myRoute;
myRoute = routeService.CalculateRoute(routeSpec);
See Also
Route.CalculatedRepresentation Property | Route.Itinerary Property | RouteSpecification.ResultMask Property | RouteServiceSoap.CalculateRoute Method