无法自动为我网站上的每个页面添加位置

时间:2018-04-19 09:21:16

标签: html maps

我为酒店预订创建了一个网站。我在每个酒店的页面上都嵌入了谷歌地图。但是地图在每个页面上显示相同的位置。我想知道如何在每页显示不同酒店的正确酒店位置 这是html代码



<div class="col-md-12">
    <h3>Location:</h3>
    <hr />
    <div class="map wow fadeInDown animated col-md-6" data-wow-delay=".5s">
        <iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d249950.6890172637!2d75.4064655!3d11.8016519!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3ba424110aea3ead%3A0x40dac77add54a87c!2sEdakkad%2C+Kerala!5e0!3m2!1sen!2sin!4v1523005920045" width="100%" height="100%" frameborder="0" style="border:0" allowfullscreen></iframe>
    </div>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

您应该在[HERE]

中传递GMaps的参数
<div class="col-md-12">
    <h3>Location:</h3>
    <hr />
    <div class="map wow fadeInDown animated col-md-6" data-wow-delay=".5s">
        <iframe src="[HERE]" width="100%" height="100%" frameborder="0" style="border:0" allowfullscreen></iframe>
    </div>
</div>

示例网址为: https://www.google.com/maps/search/?api=1&参数

如果您想使用位置,可以使用以下内容: https://www.google.com/maps/search/?api=1&query=58.698017,-152.522067