${iServer2_GetEntityParameters_Title}

${iServer2_GetEntityParameters_Description}

상속: ParametersBase
        /// <summary>${iServer2_GetEntityService_method_ProcessAsync_D}</summary>
        /// <param name="parameters">${iServer2_GetEntityService_method_ProcessAsync_param_parameters}</param>
        /// <param name="state">${iServer2_GetEntityService_method_ProcessAsync_param_state}</param>
        public void ProcessAsync(GetEntityParameters parameters, object state)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(ExceptionStrings.ArgumentIsNull);
            }
            if (string.IsNullOrEmpty(base.Url))
            {
                throw new InvalidOperationException(ExceptionStrings.InvalidUrl);
            }

            if (!base.Url.EndsWith("/"))
            {
                base.Url += '/';
            }

            base.SubmitRequest(base.Url + "commonhandler?", GetParameters(parameters),
                new EventHandler<RequestEventArgs>(request_Completed), state,false);
        }
        //查询成功高亮显示选中地物,并显示相关属性信息
        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);
        }
        private Dictionary<string, string> GetParameters(GetEntityParameters parameters)
        {
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            string method = "GetEntity";
            dictionary.Add("method", method);
            dictionary.Add("mapName", parameters.MapName);

            Dictionary<string, string> dict = new Dictionary<string, string>();
            dict.Add("mapName", parameters.MapName);
            dict.Add("layerName", parameters.LayerName);
            dict.Add("id", parameters.ID.ToString());
            dictionary.Add("params", Bridge.CreateParams(method, dict));

            return dictionary;
        }
 /// <overloads>${iServer2_GetEntityService_method_ProcessAsync_overloads_D}</overloads>
 /// <summary>${iServer2_GetEntityService_method_ProcessAsync_D}</summary>
 /// <param name="parameters">${iServer2_GetEntityService_method_ProcessAsync_param_parameters}</param>
 public void ProcessAsync(GetEntityParameters parameters)
 {
     ProcessAsync(parameters, null);
 }