Share via


RouteServiceSoap.UserInfoRouteHeaderValue Property

RouteServiceSoap.UserInfoRouteHeaderValue Property

The context-related information (UserInfoRouteHeader object) that defines the locale, language, and unit of measurement in which results are returned from the RouteServiceSoap methods.


Public UserInfoRouteHeaderValue As
UserInfoRouteHeader


[C#]

public UserInfoRouteHeader UserInfoRouteHeaderValue;

Example

[Visual Basic]

'Calculate a route and get the distance units 
'returned in miles
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 routeService As New RouteServiceSoap()
routeService.UserInfoRouteHeaderValue = New UserInfoRouteHeader()
routeService.UserInfoRouteHeaderValue.DefaultDistanceUnit = DistanceUnit.Mile

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



[C#]

//Calculate a route and get the distance
//units returned in miles
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;

RouteServiceSoap routeService = new RouteServiceSoap();
routeService.UserInfoRouteHeaderValue = new UserInfoRouteHeader();
routeService.UserInfoRouteHeaderValue.DefaultDistanceUnit = DistanceUnit.Mile;

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


See Also

  RouteServiceSoap Class   |   UserInfoRouteHeader Class