请求未经授权或超过querylimit [英] Request not authorized or over querylimit

查看:91
本文介绍了请求未经授权或超过querylimit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其实我想找到使用GoogleMaps.LocationServices API的lat和long地址。



代码:

 使用 GoogleMaps.LocationServices; 
使用系统;

命名空间协调
{
public static class LocationService
{

public static 位置位置(字符串地址)
{
var locationService = new GoogleLocationService();
var location = new Location();
尝试
{
var point = locationService.GetLatLongFromAddress(address );

if (point!= null
{
location.Latitude = point.Latitude.ToString();
location.Longitude = point.Longitude.ToString();
}
}
catch (例外情况)
{
Console.WriteLine(ex.Message) ;
}

返回位置;
}
}
}





i得到了类似未处理的类型异常的错误'System.Net.WebException'发生在GoogleMaps.LocationServices.dll

附加信息:请求未授权或超过QueryLimit代码中的以下行

  var  point = locationService.GetLatLongFromAddress(address); 





请帮帮我



谢谢你/>


我尝试了什么:



i得到的错误如An GoogleMaps.LocationServices.dll中发生了'System.Net.WebException'类型的未处理异常

其他信息:请求未授权或超过QueryLimit代码中的以下行

  var  point = locationService.GetLatLongFromAddress(address); 

解决方案

您可能需要在达到请求限制时付款,请参阅此处的信息:

Google Maps Platform网络服务的使用限制  |  Google Maps API高级计划  |  Google Developers [ ^

Actually i want to find out the lat and long based Address using GoogleMaps.LocationServices API.

code:

using GoogleMaps.LocationServices;
using System;

namespace Coordination
{
    public static class LocationService
    {
       
        public static Location Location (string address)
        {
            var locationService = new GoogleLocationService();
            var location = new Location();
            try
            {
                var point = locationService.GetLatLongFromAddress(address);

                if (point != null)
                {
                    location.Latitude = point.Latitude.ToString();
                    location.Longitude = point.Longitude.ToString();
                }
            }
            catch(Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            return location;
        }
    } 
}



i had got the the error like "An unhandled exception of type 'System.Net.WebException' occurred in GoogleMaps.LocationServices.dll
Additional information: Request Not Authorized or Over QueryLimit" in the following line in the code

var point = locationService.GetLatLongFromAddress(address);



Please help me

Thank u

What I have tried:

i had got the the error like "An unhandled exception of type 'System.Net.WebException' occurred in GoogleMaps.LocationServices.dll
Additional information: Request Not Authorized or Over QueryLimit" in the following line in the code

var point = locationService.GetLatLongFromAddress(address);

解决方案

You probably have to pay as you have reached the limit of requests, see information here:
Usage Limits for Google Maps Platform Web Services  |  Google Maps APIs Premium Plan  |  Google Developers[^]


这篇关于请求未经授权或超过querylimit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆