Ejemplo n.º 1
0
        /// <summary>
        /// ID查询POI信息
        /// </summary>
        /// <param name="queryParam">查询参数</param>
        /// <returns>搜索POI查询结果</returns>
        public string SearchOriginalPOIByDetail(POIDetailParam queryParam)
        {
            string getUrl = GaoDeConst.WebAPIHost + "/v3/place/detail?{0}";
            string paras  = queryParam.GenerateParams();

            getUrl = string.Format(getUrl, paras);
            string queryResult = WebRequestHelper.HttpGet(getUrl);

            return(queryResult);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// ID查询POI信息
        /// </summary>
        /// <param name="queryParam">查询参数</param>
        /// <returns>搜索POI查询结果</returns>
        public POIPlaceResult SearchPOIByDetail(POIDetailParam queryParam)
        {
            queryParam.output = "JSON";
            string jsonResult = SearchOriginalPOIByDetail(queryParam);

            if (!string.IsNullOrWhiteSpace(jsonResult))
            {
                jsonResult = jsonResult.Replace("[]", "\"\"");
            }
            POIPlaceResult queryResult = JsonConvert.DeserializeObject <POIPlaceResult>(jsonResult);

            return(queryResult);
        }