/// <summary> /// 关键字搜索POI信息 /// </summary> /// <param name="queryParam">查询参数</param> /// <returns>搜索POI查询结果</returns> public string SearchOriginalPOIByText(POITextParam queryParam) { string getUrl = GaoDeConst.WebAPIHost + "/v3/place/text?{0}"; string paras = queryParam.GenerateParams(); getUrl = string.Format(getUrl, paras); string queryResult = WebRequestHelper.HttpGet(getUrl); return(queryResult); }
/// <summary> /// 关键字搜索POI信息 /// </summary> /// <param name="queryParam">查询参数</param> /// <returns>搜索POI查询结果</returns> public POIPlaceResult SearchPOIByText(POITextParam queryParam) { queryParam.output = "JSON"; string jsonResult = SearchOriginalPOIByText(queryParam); if (!string.IsNullOrWhiteSpace(jsonResult)) { jsonResult = jsonResult.Replace("[]", "\"\""); } POIPlaceResult queryResult = JsonConvert.DeserializeObject <POIPlaceResult>(jsonResult); return(queryResult); }