地理编码地址不给出纬度和经度

时间:2018-09-24 09:25:07

标签: swift google-maps

我正在使用我们产品的URL http://maps.googleapis.com/maps/api/geocode/json?address="ADDRESS"&sensor=false?key=APIKey。但没有得到结果。即使我使用API​​密钥,它也会显示错误

{
   "error_message" : "Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account",
   "results" : [],
   "status" : "OVER_QUERY_LIMIT"
}

无法理解我要去哪里。任何帮助将不胜感激

2 个答案:

答案 0 :(得分:2)

我相信New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT New-Item HKCR:\directory\shell\PowerShellScript New-Item HKCR:\directory\shell\PowerShellScript\command Set-ItemProperty 'HKCR:\directory\shell\PowerShellScript\command' -Name '(default)' -Value 'Powershell -WindowStyle Hidden -ExecutionPolicy Bypass -NoExit -File "C:\Test.ps1" "%L"' 是错误的。

看看这部分http://maps.googleapis.com/maps/api/geocode/json?address="ADDRESS"&sensor=false?key=APIKey,它应该是?key=APIKey。另外请注意,地址参数不应包含&key=APIKey符号,并且不再需要传感器参数,该参数很久以前就已弃用。

请求应该是

"

我希望这会有所帮助!

答案 1 :(得分:0)

很明显,

  

“无钥匙访问Google Maps Platform”

要使用Google API,您需要注册应用程序并请求API服务。 因此您将拥有

访问要使用的密钥,请记住,所有API服务都需要客户密钥,并且您必须在请求中提供该密钥,否则您将无法使用任何密钥的Google API。

您可以在注册here

后生成密钥