${iServer2_NetworkAnalystEventArgs_Title}

${iServer2_NetworkAnalystEventArgs_Description}

Inheritance: SuperMap.Web.Service.ServiceEventArgs
 private void OnProcessCompleted(NetworkAnalystEventArgs args)
 {
     if (ProcessCompleted != null)
     {
         Application.Current.RootVisual.Dispatcher.BeginInvoke(ProcessCompleted, new object[] { this, args });
     }
 }
 private void request_Completed(object sender, RequestEventArgs e)
 {
     JsonObject jsonObject = (JsonObject)JsonObject.Parse(e.Result);
     NetworkAnalystResult result = NetworkAnalystResult.FromJson(jsonObject);
     LastResult = result;
     NetworkAnalystEventArgs args = new NetworkAnalystEventArgs(result, e.Result, e.UserState);
     OnProcessCompleted(args);
 }
        //服务器返回结果,将最佳路径显示在客户端
        private void service_ProcessCompleted(object sender, NetworkAnalystEventArgs e)
        {
            foreach (ServerGeometry p in e.Result.Paths)
            {
                PredefinedLineStyle simpleLineStyle = new PredefinedLineStyle();
                simpleLineStyle.Stroke = new SolidColorBrush(Colors.Blue);
                simpleLineStyle.StrokeThickness = 2;

                //显示返回的路径
                Feature path = new Feature();
                path.Geometry = p.ToGeometry();
                path.Style = simpleLineStyle;
                featuresLayer.AddFeature(path);
            }
        }