${REST_FindLocationParameters_Title}

${REST_FindLocationParameters_Description}

        private Dictionary<string, string> GetParameters(FindLocationAnalystParameters parameters)
        {
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            
            if (parameters.SupplyCenters != null && parameters.SupplyCenters.Count > 0)
            {
                List<string> temp = new List<string>();
                for (int i = 0; i < parameters.SupplyCenters.Count; i++)
                {
                    temp.Add(string.Format("{0}", SupplyCenter.ToJson(parameters.SupplyCenters[i])));
                }
                dictionary.Add("supplyCenters",string.Format("[{0}]", string.Join(",", temp.ToArray())));
            }

            dictionary.Add("isFromCenter", parameters.IsFromCenter.ToString().ToLower());
            dictionary.Add("expectedSupplyCenterCount", parameters.ExpectedSupplyCenterCount.ToString());
            //dictionary.Add("nodeDemandField", parameters.NodeDemandField);
            dictionary.Add("weightName", parameters.WeightName);
            dictionary.Add("turnWeightField", parameters.TurnWeightField);
            dictionary.Add("returnEdgeFeatures", parameters.ReturnEdgeFeature.ToString().ToLower());
            dictionary.Add("returnEdgeGeometry", parameters.ReturnEdgeGeometry.ToString().ToLower());
            dictionary.Add("returnNodeFeatures", parameters.ReturnNodeFeature.ToString().ToLower());

            return dictionary;
        }
        /// <summary>${REST_FindLocationService_method_ProcessAsync_D}</summary>
        /// <param name="parameters">${REST_FindLocationService_method_ProcessAsync_param_Parameters}</param>
        /// <param name="state">${REST_FindLocationService_method_ProcessAsync_param_state}</param>
        public async Task<FindLocationAnalystResult> ProcessAsync(FindLocationAnalystParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(ExceptionStrings.ArgumentIsNull);
            }
            if (string.IsNullOrEmpty(this.Url))
            {
                throw new InvalidOperationException(ExceptionStrings.InvalidUrl);
            }

            if (!base.Url.EndsWith("/"))
            {
                base.Url += '/';
            }
            //参数必须放在 URI 中
            base.Url += "location.json?debug=true&_method=GET";            
                        
           var result=await base.SubmitRequest(base.Url, GetParameters(parameters), true);
            JsonObject jsonObject = JsonObject.Parse(result);
           return FindLocationAnalystResult.FromJson(jsonObject);
        }