Google maps Jekyll-谷歌地图服务器API未显示正确地址

Google maps Jekyll-谷歌地图服务器API未显示正确地址,google-maps,google-maps-api-3,jekyll,Google Maps,Google Maps Api 3,Jekyll,我正在为一个朋友开发一个个人网页,使用Jekyll,我想加入一个动态的谷歌地图,以便找到一个地方!因此,我的\u config.yml如下所示: address: Themistokleous 64 Athens 106 81 Greece 但是该地址没有正确显示在网站上。。有人知道我该如何输入地址吗??提前谢谢 这是我在github上的代码:您的q={%for site.address%}{{{address.line}},{%endfor%}引用了一个不存在的配置变量 _config.ym

我正在为一个朋友开发一个个人网页,使用Jekyll,我想加入一个动态的谷歌地图,以便找到一个地方!因此,我的
\u config.yml
如下所示:

address: Themistokleous 64 Athens 106 81 Greece
但是该地址没有正确显示在网站上。。有人知道我该如何输入地址吗??提前谢谢


这是我在github上的代码:

您的
q={%for site.address%}{{{address.line}},{%endfor%}
引用了一个不存在的配置变量

_config.yml中当前可用的变量有:

因此,您可以:

q={{ site.address }},{{ site.location }}
完整的iframe是:

<iframe id="map_iframe"
    width="100%"
    height="100%"
    frameborder="0"
    scrolling="no"
    marginheight="0"
    marginwidth="0"
    src="https://maps.google.com/maps/embed/v1/place?key={{ site.google_api_key }}&q={{ site.address }},{{ site.location }}"
    allowfullscreen>
  </iframe>

您的
q={%for site.address%}{{address.line},{%endfor%}
引用了一个不存在的配置变量

_config.yml中当前可用的变量有:

因此,您可以:

q={{ site.address }},{{ site.location }}
完整的iframe是:

<iframe id="map_iframe"
    width="100%"
    height="100%"
    frameborder="0"
    scrolling="no"
    marginheight="0"
    marginwidth="0"
    src="https://maps.google.com/maps/embed/v1/place?key={{ site.google_api_key }}&q={{ site.address }},{{ site.location }}"
    allowfullscreen>
  </iframe>


问题在于位置甚至不是地址的真实位置。。我的意思是我写在地址上:希腊雅典,它展示了纽约。。。在_config.yml文件中写入地址是否有特定的标准方法?如果我完全错了,请纠正我好吗?我是新来的Jekyll你试过我的iframe代码吗?对我来说,它起作用了。哦,你说得对!!我在复印的时候有个打字错误。。非常感谢您的时间和帮助回答!!:-)问题是地点甚至不是地址真实的地方。。我的意思是我写在地址上:希腊雅典,它展示了纽约。。。在_config.yml文件中写入地址是否有特定的标准方法?如果我完全错了,请纠正我好吗?我是新来的Jekyll你试过我的iframe代码吗?对我来说,它起作用了。哦,你说得对!!我在复印的时候有个打字错误。。非常感谢您的时间和帮助回答!!:-)