我正在尝试编写地理编码程序。我创建了 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密钥还需要在其他地方激活才能工作吗?