Google地图:任何人都可以帮我在我的代码中设置以下位置吗?

时间:2014-05-01 06:40:01

标签: html html5 google-maps

<div class="map">
    <iframe width="100%" height="175" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.co.in/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Lighthouse+Point,+FL,+United+States&amp;aq=4&amp;oq=light&amp;sll=26.275636,-80.087265&amp;sspn=0.04941,0.104628&amp;ie=UTF8&amp;hq=&amp;hnear=Lighthouse+Point,+Broward,+Florida,+United+States&amp;t=m&amp;z=14&amp;ll=26.275636,-80.087265&amp;output=embed"></iframe><br><small><a href="https://maps.google.co.in/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Lighthouse+Point,+FL,+United+States&amp;aq=4&amp;oq=light&amp;sll=26.275636,-80.087265&amp;sspn=0.04941,0.104628&amp;ie=UTF8&amp;hq=&amp;hnear=Lighthouse+Point,+Broward,+Florida,+United+States&amp;t=m&amp;z=14&amp;ll=26.275636,-80.087265" style="color:#777;text-align:left;font-size:0.85em">View Larger Map</a></small>
</div>

我想设置此位置https://www.google.co.in/maps/place/Railway+Basketball+Court/@23.338003,75.046929,16z/data=!4m2!3m1!1s0x0:0xdc7e2bda17b6799e

在上面的代码中

2 个答案:

答案 0 :(得分:2)

尝试使用:

<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d7326.773276182956!2d75.046929!3d23.338003!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xdc7e2bda17b6799e!2sRailway+Basketball+Court!5e0!3m2!1sen!2sin!4v1398929598162" width="600" height="450" frameborder="0" style="border:0">
</iframe>

有关详细信息,请单击左下角地图上的设置图标,然后单击“共享”或“嵌入地图”

答案 1 :(得分:1)

这会将你的地图设置为指向篮球场

<div class="map">
<iframe width="100%" height="175" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d7326.773276182955!2d75.046929!3d23.338003!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xdc7e2bda17b6799e!2sRailway+Basketball+Court!5e0!3m2!1sen!2sin!4v1398926727930" ></iframe>
<br>
<small>
    <a href="https://www.google.co.in/maps/place/Railway+Basketball+Court/@23.338003,75.046929,16z/data=!4m2!3m1!1s0x0:0xdc7e2bda17b6799e" style="color:#777;text-align:left;font-size:0.85em">View Larger Map</a>
</small>
</div>

你也可以在google地图上打开右边的齿轮打开下拉菜单去分享和嵌入地图并点击嵌入地图,它会为你生成iframe。