I have a problem with the calculation of the route using point type FUZZY. When I use this type of item I will return to me when calculating error "This service-method does not support vehicle- or routing-options".
I tried to set possible and impossible, but without result.
Please can you give me information about what is needed to have with this type of set point?
csharp code
Code: Select all
.
.
.
ViaType vt = new ViaType( );
vt.viaType = ViaTypeEnum.FUZZY;
for (int x = 0; x < CalculationWayPointsList.Count; x++)
{
wayPoints[x] = new WaypointDesc();
if (CalculationWayPointsList[x].Type == "M")
{
wayPoints[x].linkType = LinkType.FUZZY_LINKING;
wayPoints[x].viaType = vt;
}
else
{
wayPoints[x].linkType = LinkType.AUTO_LINKING;
}
wayPoints[x].fuzzyRadius = 10000;
wayPoints[x].wrappedVehicleOptions = VehOption;
clickPoint = new PTVxServerInternet.XrouteService.PlainPoint { x = CalculationWayPointsList[x].Mercator_Longitude, y = CalculationWayPointsList[x].Mercator_Latitude };
wayPoints[x].wrappedCoords = new XrouteService.Point[] { new XrouteService.Point { point = clickPoint } };
}
.
.
.
.
ResultListOptions RsltListOptions = new ResultListOptions();
RsltListOptions.binaryPathDesc = true;
RsltListOptions.polygon = true;
RsltListOptions.dynamicInfo = true;
RsltListOptions.extSegments = true;
RsltListOptions.featureDescriptions = true;
RsltListOptions.nodes = true;
RsltListOptions.speedLimits = true;
RsltListOptions.segments = true;
RsltListOptions.texts = true;
RsltListOptions.detailLevel = DetailLevel.ALL;
RsltListOptions.polygonElevationsSpecified = true;
RsltListOptions.polygonElevations = true;
RsltListOptions.tollManoeuvres = true;
DateTime dt = Convert.ToDateTime(dtpStartTime.Value).AddHours(-1);
string sStartDate = String.Format("{0:yyyy-MM-dd}", dt) + "T" + String.Format("{0:HH:mm}", dt) + "01:00";
string sIS_DESTTIME = "true";
if (cbTypJizdyCas.SelectedIndex > 0)
{
sIS_DESTTIME = "false";
}
RoutingOption[] RoutOption = new RoutingOption[8];
RoutOption[0] = new RoutingOption();
RoutOption[0].parameter = XrouteService.RoutingParameter.ROUTE_LANGUAGE;
RoutOption[0].value = "CS";
RoutOption[1] = new RoutingOption();
RoutOption[1].parameter = XrouteService.RoutingParameter.COUNTRY_ENCODING;
RoutOption[1].value = "ISO2";
RoutOption[2] = new RoutingOption();
RoutOption[2].parameter = XrouteService.RoutingParameter.START_TIME;
RoutOption[2].value = sStartDate;
RoutOption[3] = new RoutingOption();
RoutOption[3].parameter = XrouteService.RoutingParameter.IS_DESTTIME;
RoutOption[3].value = sIS_DESTTIME;
RoutOption[4] = new RoutingOption();
RoutOption[4].parameter = XrouteService.RoutingParameter.OPTIMIZATION;
RoutOption[4].value = Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Optimisation));
RoutOption[5] = new RoutingOption();
RoutOption[5].parameter = XrouteService.RoutingParameter.GENERATE_EXTWAYPOINTS;
RoutOption[5].value = "true";
RoutOption[6] = new RoutingOption();
RoutOption[6].parameter = XrouteService.RoutingParameter.ENABLE_DYNAMIC;
RoutOption[6].value = "true";
RoutOption[7] = new RoutingOption();
RoutOption[7].parameter = XrouteService.RoutingParameter.DYNAMIC_PROFILE;
RoutOption[7].value = "PTV_TruckAttributes";
.
.
.
string sXML = Properties.Settings.Default.CalculateProfile;
string sNewXML = String.Format(sXML,
Convert.ToString(chbTruckAtributes.Checked),
emission_class,
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Cylinder_Capacity * 1000.0)),
fuel_type,
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Unload_Weight * 1000.0)),
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Total_Weight * 1000.0)),
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Total_Weight * 1000.0)),
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Number_of_Axles)),
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Unload_Trailer_Weight * 1000.0)),
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Height * 100.0)),
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Length * 100.0)),
Convert.ToString(Convert.ToInt32(Selected_VehicleProfileList.Width * 100.0))
);
calculateRouteResponse response = xRoute.calculateRoute(new calculateRouteRequest
{
ArrayOfWaypointDesc_1 = wayPoints,
ArrayOfRoutingOption_2 = RoutOption,
ResultListOptions_4 = RsltListOptions,
CallerContext_5 = new PTVxServerInternet.XrouteService.CallerContext
{
wrappedProperties = new[]
{
new PTVxServerInternet.XrouteService.CallerContextProperty { key = "ProfileXMLSnippet", value = sNewXML }
}
}
});
Vladimir