【问题标题】:Changing the zoom on an embedded Google Map is not working?更改嵌入式 Google 地图的缩放不起作用?
【发布时间】:2017-09-30 03:33:42
【问题描述】:

我去了 Google 地图并查找了我的营业地点。我单击菜单并单击“共享或嵌入地图”。以下是我从这里收到的代码:

<iframe allowfullscreen="" frameborder="0" height="300" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2838.140854905187!2d-93.25362548400399!3d44.65547377909972!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x87f637fd87564a85%3A0x8af98c0084446fb5!2sAnchor+Bank+Lakeville!5e0!3m2!1sen!2sus!4v1493732032364" style="border:0" width="400"></iframe>

这段代码看起来不像我在线程中看到的任何其他类似问题的代码,我不确定这是为什么,但这可能是我的问题的一部分。

我正在尝试将地图设置为稍微缩小,因为目前小地图会切断我的标记。我尝试将&amp;z=nn 添加到 src 的末尾,但这没有奏效。

【问题讨论】:

  • 嗨,凯莉!你能分享你的代码尝试吗?
  • 对不起没想到我的代码没有发布!
  • 在您点击“共享或嵌入地图”之前,按照您希望嵌入地图的显示方式设置地图(使用正确的缩放比例)。
  • 我试过了,但是一旦我将它添加到页面中,我一直得到相同的结果。
  • 我切换了浏览器,现在可以了! (IE 是我办公室的标准 - 但它在 Chrome 中工作)。谢谢!!!!!!

标签: javascript html css google-maps iframe


【解决方案1】:

你可以这样使用它:

<iframe src="http://maps.google.com/maps?z=12&t=m&q=loc:"your latitude here ignore the quotes"+"your longtitude here ignore the quotes"&output=embed" width="100%" height="300"></iframe>

您可以通过右键单击谷歌地图并选择“这是什么地方?”来获取坐标。上下文菜单。这将是一种更简单的方法。此外,您可以通过更改 url 中的 z 参数来更改缩放。

【讨论】:

    猜你喜欢
    • 2015-04-09
    • 1970-01-01
    • 1970-01-01
    • 2014-03-26
    • 2023-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多