【发布时间】:2021-06-28 05:15:40
【问题描述】:
我正在尝试对地理编码进行编程。我创建了 API 密钥,但是当我将它添加到我的网站代码中时,我什么也没得到,但是当我不使用 API 时,一切正常。当我发送时:
https://maps.googleapis.com/maps/api/geocode/json?address=".$adres."&key=KLUCZ_XXX
我收到回复:
Browser API keys cannot have referer restrictions when used with this API.
如果我使用:
https://maps.googleapis.com/maps/api/geocode/json?address=".$adres"
结果正确,但每天的查询次数有限。
关键约束:引用 HTTP (Web) - 设置为从中进行查询的域。接口 Google Maps Geocoding API 已开启。
API 密钥是否也必须在其他地方激活才能工作?
【问题讨论】: