${iServer2_Query_QueryServiceEventArgs_Title}
${iServer2_Query_QueryServiceEventArgs_Description}
private void query_ProcessCompleted(object sender, QueryEventArgs e) { if (e.ResultSet == null) { MessageBox.Show("No Result!"); return; } sgVegetable = e.ResultSet.RecordSets[0].Records[0].Shape; FeatureCollection fc = e.ResultSet.RecordSets[0].ToFeatureSet(); Feature f = new Feature { Geometry = fc[0].Geometry, Style = this.GreenFillStyle }; paramLayer.Features.Add(f); }
private void query_ProcessCompleted(object sender, QueryEventArgs e) { if (e.ResultSet == null) { MessageBox.Show("没结果!"); return; } FeaturesLayer featuresLayer = MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; foreach (RecordSet item in e.ResultSet.RecordSets) { foreach (Feature feature in item.ToFeatureSet()) { featuresLayer.Features.Add(feature); } } }
private void request_Completed(object sender, RequestEventArgs e) { JsonObject jsonObject = (JsonObject)JsonObject.Parse(e.Result); ResultSet result = ResultSet.FromJson(jsonObject); LastResult = result; QueryEventArgs args = new QueryEventArgs(result, e.Result, e.UserState); OnProcessCompleted(args); }
private void OnProcessCompleted(QueryEventArgs args) { if (ProcessCompleted != null) { Application.Current.RootVisual.Dispatcher.BeginInvoke( ProcessCompleted, new object[] { this, args }); } }
private void selectQuery_ProcessCompleted(object sender, QueryEventArgs e) { //点击处没有地物的情况 if (e.ResultSet == null) { MessageBox.Show("查询结果为空!"); // dgVegetable.Visibility = Visibility.Collapsed; return; } //点击处存在地物时,用蓝色边显示该地物 PredefinedFillStyle selectStyle = new PredefinedFillStyle(); selectStyle.Stroke = new SolidColorBrush(Colors.Blue); FeatureCollection fc = e.ResultSet.RecordSets[0].ToFeatureSet(); Feature f = new Feature { Geometry = fc[0].Geometry, Style = selectStyle }; drawLayer.Features.Add(f); //记录所选地物的id号,为删除地物准备 ids.Add(e.ResultSet.RecordSets[0].Records[0].Shape.Id); //记录所选地物的几何形状,为合并地物准备 unionGeometry.Add(e.ResultSet.RecordSets[0].Records[0].Shape); }
//查询成功高亮显示选中地物,并显示相关属性信息 private void query_ProcessCompleted(object sender, QueryEventArgs e) { //点击处没有地物的情况 if (e.ResultSet == null) { MessageBox.Show("查询结果为空!"); dgVegetable.Visibility = Visibility.Collapsed; return; } //点击处存在地物时,用蓝色边显示该地物 PredefinedFillStyle selectStyle = new PredefinedFillStyle(); selectStyle.Stroke = new SolidColorBrush(Colors.Blue); FeatureCollection fc = e.ResultSet.RecordSets[0].ToFeatureSet(); Feature f = new Feature { Geometry = fc[0].Geometry, Style = selectStyle }; drawLayer.Features.Add(f); //记录地物ID号,为设置GetEntityParameters做准备 entityID = e.ResultSet.RecordSets[0].Records[0].Shape.Id; GetEntityParameters parameters = new GetEntityParameters { ID = entityID, MapName = "Changchun", LayerName = "Vegetable@changchun" }; GetEntityService getEntityService = new GetEntityService("http://localhost:7080/demo"); getEntityService.ProcessAsync(parameters); getEntityService.ProcessCompleted += new EventHandler<GetEntityEventArgs>(getEntityService_ProcessCompleted); }
void s_ProcessCompleted(object sender, QueryEventArgs e) { featuresLayer.Renderer = new UniformRenderer { MarkerStyle = new PredefinedMarkerStyle() { Color = new SolidColorBrush(Colors.Blue), Size = 20, Symbol = PredefinedMarkerStyle.MarkerSymbol.Diamond } }; foreach (RecordSet item in e.ResultSet.RecordSets) { featuresLayer.AddFeatureSet(item.ToFeatureSet()); } }
void qss_ProcessCompleted(object sender, QueryEventArgs e) { for (int i = 0; i < e.ResultSet.RecordSets.Count; i++) { foreach (Feature f in e.ResultSet.RecordSets[i].ToFeatureSet()) { f.Style = new FillStyle { Fill = new SolidColorBrush(new Color { A = 100, R = 0, G = 100, B = 0 }), Stroke = new SolidColorBrush(Colors.Blue), StrokeThickness = 1 }; featuresLayer.Features.Add(f); } } }
// 服务器返回查询结果,记录在QueryServiceEventArgs中 private void ProcessCompleted(object sender, QueryEventArgs e) { ShowResult(e.ResultSet); }
//服务器返回查询结果,记录在QueryServiceEventArgs中 private void queryByCenterService_ProcessCompleted(object sender, QueryEventArgs e) { ShowResult(e.ResultSet); }