当我使用浏览器API密钥在我的页面中包含以下代码时:
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBvjzyCJmLPnsrBjMXy1RTaRqZzTCtqZgw"></script>
我收到错误:
This page was unable to display a Google Maps element. The provided Google API key is invalid or this site is not authorized to use it. Error Code: InvalidKeyOrUnauthroizedURLMapError
在Google Developers Console中,我访问了API&amp; auth-&gt; Credentials-&gt;接受来自这些HTTP引用(网站)的请求...然后输入*.mywebsite.com/*
。我在这里做错了什么?
答案 0 :(得分:1)
我相信你错误地将它链接起来了。 尝试:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.22&key=yourkey"></script>