${IS6_FindPathByPointsParameters_Title}

${IS6_FindPathByPointsParameters_Description}

${IS6_FindPathByPointsParameters_Remarks}
Inheritance: ParametersBase
 /// <summary>${IS6_FindPathByPointsService_method_ProcessAsync_D}</summary>
 /// <param name="parameters">${IS6_FindPathByPointsService_method_ProcessAsync_param_parameters}</param>
 /// <param name="state">${IS6_FindPathByPointsService_method_ProcessAsync_param_state}</param>
 public void ProcessAsync(FindPathByPointsParameters parameters, object state)
 {
     if (parameters == null)
     {
         //TODO:资源
         throw new ArgumentNullException(ExceptionStrings.ArgumentIsNull);
         //throw new ArgumentNullException("FindPathByPointsParameters is Null");
     }
     if (string.IsNullOrEmpty(this.Url))
     {
         //TODO:资源
         throw new InvalidOperationException(ExceptionStrings.InvalidUrl);
         //throw new InvalidOperationException("Url is not set");
     }
     base.SubmitRequest(base.Url + "/path.ashx?", GetParameters(parameters),
         new EventHandler<RequestEventArgs>(request_Completed), state, false);
 }
        private Dictionary<string, string> GetParameters(FindPathByPointsParameters parameters)
        {
            Dictionary<string, string> dictionary = new Dictionary<string, string>();

            string method = "FindPathByPoints";
            dictionary.Add("map", parameters.MapName);
            dictionary.Add("method", method);

            dictionary.Add("points", JsonHelper.FromPoint2DCollection(parameters.Points));
            dictionary.Add("routeParam",RouteParam.ToJson( parameters.RouteParam));

            dictionary.Add("trackingLayerIndex", "-1");
            dictionary.Add("userID", Guid.NewGuid().ToString());
            dictionary.Add("isHighlight", "false");

            return dictionary;
        }
 /// <summary>${IS6_FindPathByPointsService_method_ProcessAsync_D}</summary>
 /// <overloads>${IS6_FindPathByPointsService_method_ProcessAsync_overloads_D}</overloads>
 /// <param name="parameters">${IS6_FindPathByPointsService_method_ProcessAsync_param_parameters}</param>
 public void ProcessAsync(FindPathByPointsParameters parameters)
 {
     ProcessAsync(parameters, null);
 }
        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);
        }