Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 我是否需要启用Google Map API密钥以及如何在2017年嵌入它?_Google Maps_Google Maps Api 3 - Fatal编程技术网

Google maps 我是否需要启用Google Map API密钥以及如何在2017年嵌入它?

Google maps 我是否需要启用Google Map API密钥以及如何在2017年嵌入它?,google-maps,google-maps-api-3,Google Maps,Google Maps Api 3,我正在建立一个人的网站,我想包括一个谷歌地图。我已经要求他创建一个API密钥 我试着把它包括在下面: <iframe width="600" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=MY_API_KEYq=Shop+Name,City+Name" allowfullscreen=""> </iframe> 这是正

我正在建立一个人的网站,我想包括一个谷歌地图。我已经要求他创建一个API密钥

我试着把它包括在下面:

<iframe width="600" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=MY_API_KEYq=Shop+Name,City+Name" allowfullscreen="">
</iframe>

  • 这是正确的方式吗?如何包括它?我读了谷歌文档,我认为这应该行得通

  • 但是,它告诉我“Google Maps API服务器拒绝了您的请求。此API项目无权使用此API。” 他需要先在Google后端启用域的密钥吗?还是我用了错误的方法


  • url参数之间缺少
    。更改:

    https://www.google.com/maps/embed/v1/place?key=MY_API_KEYq=Shop+Name,City+Name
    
    致:


    谢谢,我明天就试试这个。是否仍有必要在Google后端以某种方式激活域的API密钥?首先检查项目中是否启用了Google Maps嵌入API:我确实检查了。它对URL有限制,但仍然不起作用:/您是否检查了已启用API列表中是否存在嵌入API?API密钥限制是另一个问题。错误消息表示嵌入API未被授权用于生成API密钥的项目。
    https://www.google.com/maps/embed/v1/place?key=MY_API_KEY&q=Shop+Name,City+Name