${IS6_RouteParam_Title}

${IS6_RouteParam_Description}

        internal static string ToJson(RouteParam param)
        {
            if (param == null)
            {
                return null;
            }

            string json = "{";
            List<string> list = new List<string>();

            list.Add(string.Format("\"highlight\":null"));

            if (param.NetworkParams != null)
            {
                list.Add(string.Format("\"networkParams\":{0}", NetworkParams.ToJson(param.NetworkParams)));
            }
            else
            {
                list.Add(string.Format("\"networkParams\":null"));
            }

            if (param.ReturnPathInfo != null)
            {
                list.Add(string.Format("\"returnPathInfo\":{0}", ReturnPathInfoParam.ToJson(param.ReturnPathInfo)));
            }
            else
            {
                list.Add(string.Format("\"returnPathInfo\":null"));
            }

            list.Add(string.Format("\"returnNodePositions\":{0}", param.ReturnNodePositions.ToString().ToLower()));
            list.Add(string.Format("\"returnEdgeIDsAndNodeIDs\":{0}", param.ReturnEdgeIDsAndNodeIDs.ToString().ToLower()));
            list.Add(string.Format("\"returnCosts\":{0}", param.ReturnCosts.ToString().ToLower()));

            json += string.Join(",", list.ToArray());
            json += "}";
            return json;
        }
 /// <summary>${IS6_FindPathByPointsParameters_constructor_None_D}</summary>
 public FindPathByPointsParameters()
 {
     RouteParam = new RouteParam();
 }
        private void PathAnalyst_Click(object sender, RoutedEventArgs e)
        {
            //为最佳路径分析服务设置参数
            NetworkSetting networkSetting = new NetworkSetting
            {
                EdgeIDField = "SmEdgeID",
                NodeIDField = "SmNodeID",
                NetworkLayerName = "RoadNet@changchun",
                FTWeightField = "SmLength",
                TFWeightField = "SmLength",
                FromNodeIDField = "SmFNode",
                ToNodeIDField = "SmTNode",
            };

            NetworkParams networkParams = new NetworkParams
            {
                NetworkSetting = networkSetting,
                Tolerance = 30,
            };

            RouteParam routeParam = new RouteParam
            {
                NetworkParams = networkParams,
                ReturnNodePositions = true,
                ReturnEdgeIDsAndNodeIDs = true,
                ReturnCosts = true,
                ReturnPathInfo = new ReturnPathInfoParam()
                {
                    EdgeNameField = "SmEdgeID",
                    NodeNameField = "SmNodeID",
                    ReturnPathGuide = true,
                    ReturnPathTable = false,
                },
            };

            SuperMap.Web.ISDotNET6.FindPathByPointsParameters findPathParameters = new FindPathByPointsParameters
            {
                MapName = "changchun",
                Points = points,
                RouteParam = routeParam,
            };

            //最佳路径分析服务
            FindPathByPointsService service = new FindPathByPointsService("http://localhost/IS/AjaxDemo");
            service.ProcessAsync(findPathParameters);
            service.Failed += new EventHandler<ServiceFailedEventArgs>(service_Failed);
            service.ProcessCompleted += new EventHandler<RouteEventArgs>(service_ProcessCompleted);
        }