void service_ProcessComplated(object sender, RouteCalculateMeasureEventArgs e) { this.boder.Visibility = Visibility.Visible; this.measure.Text = "该点与起点A的距离为:" + e.Result.Measure.ToStringEx() + " 米"; }
private void RouteCalculateMeasureService_Complated(object sender,RequestEventArgs args) { JsonObject json = (JsonObject)JsonObject.Parse(args.Result); RouteCalculateMeasureResult result = RouteCalculateMeasureResult.FromJson(json); lastResult = result; RouteCalculateMeasureEventArgs e = new RouteCalculateMeasureEventArgs(result, args.Result, args.UserState); if(ProcessComplated!=null) { ProcessComplated (this,e); } }