Share via


RouteItinerary.View Property

RouteItinerary.View Property

The map view representations (MapViewRepresentations object) of the entire route. Contains the view by bounding rectangle coordinates, and the view by latitude and longitude coordinates of the center point, height, and width.


Public View As MapViewRepresentations


[C#]

public MapViewRepresentations View;

Example

[Visual Basic]

'Calculate a route and use the itinerary view to 
'get a map of the route 
Dim latLongs(1) As LatLong
latLongs(0) = New LatLong()
latLongs(0).Latitude = 40
latLongs(0).Longitude = -120
latLongs(1) = New LatLong()
latLongs(1).Latitude = 41
latLongs(1).Longitude = -121

Dim myRoute As Route
myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest)

Dim myRouteView(0) As ViewByHeightWidth
myRouteView(0) = myRoute.Itinerary.View.ByHeightWidth

Dim mapSpec As New MapSpecification()
mapSpec.DataSourceName = "MapPoint.NA"
mapSpec.Route = myRoute
mapSpec.Views = myRouteView

Dim myMaps() As MapImage
myMaps = renderService.GetMap(mapSpec)



[C#]

//Calculate a route and use the itinerary view to 
//get a map of the route 
LatLong[] latLongs = new LatLong[2];
latLongs[0] = new LatLong();
latLongs[0].Latitude = 40;
latLongs[0].Longitude = -120;
latLongs[1] = new LatLong();
latLongs[1].Latitude = 41;
latLongs[1].Longitude = -121;

Route myRoute;
myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest);

ViewByHeightWidth[] myRouteView = new ViewByHeightWidth[1];
myRouteView[0] = myRoute.Itinerary.View.ByHeightWidth;

MapSpecification mapSpec  = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Route = myRoute;
mapSpec.Views = myRouteView;

MapImage[] myMaps = renderService.GetMap(mapSpec);


See Also

  RouteItinerary Class   |   MapViewRepresentations Class