如何在谷歌地图上获取国家或州的所有位置(标记)

时间:2015-12-01 15:31:33

标签: c# google-maps google-maps-api-3

我尝试使用google Map API获取特定州的所有标记(位置),但在几次请求后,它不返回任何超出每日请求配额的消息

这里出现错误信息:

   "error_message" : "You have exceeded your daily request quota for this API.",
   "html_attributions" : [],
   "results" : [],
   "status" : "OVER_QUERY_LIMIT"
}

我在C#中实现这个,这里是代码:

HttpWebRequest webRequest = WebRequest.Create(@"https://maps.googleapis.com/maps/api/place/search/json?location=25.4358011,81.84631100000001&radius=40000&types=stadium&sensor=false&key=MyAPIKey") as HttpWebRequest;
            webRequest.Timeout = 20000;
            webRequest.Method = "GET";
            var result = webRequest.BeginGetResponse(new AsyncCallback(RequestCompleted), webRequest);

            var request = (HttpWebRequest)result.AsyncState;
            var response = (HttpWebResponse)request.EndGetResponse(result);
            using (var stream = response.GetResponseStream())
            {
                var r = new StreamReader(stream);
                var resp = r.ReadToEnd();

            }
            Console.ReadLine();

0 个答案:

没有答案