我正在尝试编程地理编码.我创建了API密钥,但是当我将它添加到我的网站代码中时,我没有得到任何东西,但是当我不使用API时,一切都运行良好.当我发送时:
https://maps.googleapis.com/maps/api/geocode/json?address=".$adres."&key=KLUCZ_XXX
Run Code Online (Sandbox Code Playgroud)
我收到回复:
Browser API keys cannot have referer restrictions when used with this API.
Run Code Online (Sandbox Code Playgroud)
如果我使用:
https://maps.googleapis.com/maps/api/geocode/json?address=".$adres"
Run Code Online (Sandbox Code Playgroud)
结果是正确的,但每天查询的数量是有限的.
关键约束:引用HTTP(Web) - 设置为召唤查询的域.界面Google Maps Geocoding API已启用.
API密钥是否也必须在其他地方激活才能工作?